开发者

Git with 2 developers

开发者 https://www.devze.com 2023-01-14 08:50 出处:网络
If I\'m working with one other developer on the same project, but where we each have our own areas of work (which o开发者_如何学JAVAverlap, but not frequently) how would you recommend we set up git?Th

If I'm working with one other developer on the same project, but where we each have our own areas of work (which o开发者_如何学JAVAverlap, but not frequently) how would you recommend we set up git?


The simplest workflow remains a centralized one (especially with as few developers as you have in your team)

Git with 2 developers

(much) more detail in this guide.

If you don't have an extra common environment (liek a GitHub for instance), simply create 2 repo per developers:

  • one for working in it (with a working tree)
  • one bare repo (no working tree), for you or your colleague to push to.

In this 2x2 repo setup, you can only push to your bare repo, waiting for your colleague to pull from it:

Git with 2 developers

Or you can push directly to his public bare repo (for specific patches or contribution to dev2 tasks): dev2 will pull from his own public bare repo:

Git with 2 developers

In both cases, reconciliation will happen in the private non-bare repo of the developer.

0

精彩评论

暂无评论...
验证码 换一张
取 消