Git workflow for maintaining an project extension fork?

前端 未结 2 1016
我寻月下人不归
我寻月下人不归 2021-02-05 16:05

We\'ve forked an OSS project on GitHub and are adding some custom extensions to it. We\'ll want to send some of the changes we make back to the original project (bug fixes and

2条回答
  •  情深已故
    2021-02-05 16:29

    What you want to setup is a long term fork, to do this as you already figured out the solution could be setting up a special branch linked with the original "vanilla" project and have a master branch where you maintain your custom working copy.

    The only thing that you have to keep in mind (from my point of view) is that you shouldn't merge the two branch when you want to synch changes, but in this case (When Branches Diverge) there is the handy Git Cherry-Pick command that lets you take a single commit from one branch and apply it to another, this could be particularly useful in the case of maintaining a fork because you can easily exchange single commit from one branch to another ...

提交回复
热议问题