title: Strategy for keeping gRPC definitions and generated files in VCS
body: <p>I wanted to use gRPC in a system composed of multiple services (each in its own repository) and I was wondering about approach towards versioning in Git:</p>
  
  <ul>
  <li>*.proto files</li>
  <li>generated code (mostly Go/Java/Python)</li>
  </ul>
  
  <p>So far I was thinking about approach like:</p>
  
  <ul>
  <li>*.proto files - either:
  
  <ol>
  <li>each definition goes to separate repository</li>
  <li>each definition lands in repository of service that implements defined service</li>
  </ol></li>
  <li>generated code - one of:
  
  <ol>
  <li>goes into the same repository as in 1. above</li>
  <li>goes into the same repository as in 2. above</li>
  <li>there is no generated code at all - it is generated by built system/script before actual built</li>
  </ol></li>
  </ul>
  
  <p>I'm not too experienced in gRPC and I have hard time to tell whether one of those is much better/worse than others. I can see some pros and cons of those (like good IDE integration, no need for app that generates code, etc.) but I wonder about some "big" potential problems? Which approach is "best practice"?</p>