How can I have two “streams of development” (branches?) track each other while remaining different in particular ways?

孤人 提交于 2019-12-05 06:38:14

In git you could maintain a master branch with all the common files (maybe plus the differing ones in some default state) and customized branches like work or cygwin.

When you want to make a change that should propagate to every machine you do it in master. If you want something to go only to work/cygwin machines, you do it in an appropriate branch.

When you pull new changes from master on a machine that has a customized branch checked out, you simply have to git merge master or git rebase master from that branch.

Which one you should use is a matter of preference, the resulting working directory is the same, only the history differs. Using merge you will always see when you updated the customized branch with changes from master. Using rebase it will look like all the customizations branch off the tip of master, as if you had first done everything in master and only then committed any customizations.

Unfortunately I have no idea about other DVCS's as I don't have any experience with them, however, I believe that this procedure for git is pretty straightforward.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!