Git Setup Best practices

后端 未结 5 1622
执笔经年
执笔经年 2021-01-30 11:28

I was tasked with setting up Git for my office. We have several sites. I just set up a network drive for us to push our changes to. My question is: Where do I init the Git repos

5条回答
  •  梦毁少年i
    2021-01-30 12:12

    The structure of repos is not a matter if sites (whatever you want to tell with that) but a matter of projects.

    As a rule of thumb:

    • use ONE (bare, blessed) repo for each independent project
    • if common modules are shared, realize with submodules

    Within each repo, structure the work with branches, and do not confuse branches with means of organizing different software stacks: branches are used to organize the work in one repo (i.e. different development strings of ONE software). One branching model (that seems to be quite popular here at SO) is this one:

    enter image description here

    Confused? Curious? Read the explanation...

提交回复
热议问题