Git Workflow Best practices

前端 未结 5 1792
长情又很酷
长情又很酷 2021-02-01 08:53

Stupid question and treat me as completely a newbie to version control.

I\'m new to Git (I\'ve used subversion before, but just the basics) I understand the basics of G

5条回答
  •  自闭症患者
    2021-02-01 08:55

    The opposite recommendations for who maintains the master branch from Question Mark and kaitanie—Question Mark recommending John work on master whereas kaitanie recommending Eric work on master—demonstrates Git's workflow flexibility.

    As far as Chris Nicola recommending rebasing instead of merging, I would provide the same caution as found in Pro Git by Scott Chacon, which is available to read free online and I highly recommend, "Do not rebase commits that you have pushed to a public repository." Since "every day [John is] required to commit his code back to the repository (GitHub)", I would probably stay away from rebasing except where used locally by John and Eric.

    I would recommend that you read the "Branching Workflows" section of Pro Git, which describes long-running branches and topic branches. You should probably also take a look at the "Distributed Workflows" section, which describes Centralized Workflow, an Integration-Manager Workflow, and a Dictator and Lieutenants Workflow.

提交回复
热议问题