目前git正在做我的头,我不能提出以下最好的解决方案。
There are two branches, one called master and one called mobiledevicesupport. I want to keep mobiledevicesupport as a continuous branch that will be merged/synced with the master branch whenever mobiledevicesupport is stable. This would merge changes from mobiledevicesupport into master but also bring all the changes from master into mobiledevicesupport so that branch can continue to be worked on and the features improved or amended. This needs to work with a central repository and multiple developers.
请举一个其他人使用的类似工作流程的例子,或者只是告诉我这个想法是否愚蠢,我应该考虑其他选择。目前,工作流程似乎很健全,但我只是不知道如何使git以这种方式工作。
谢谢,非常感谢所有的帮助。
更新1: 如果我将master合并到mobiledevicesupt中,并将mobiledevicesupport合并到master中,我是否会在两个分支之间复制提交?或者git是否足够聪明,可以计算出我已经将最新的更改从分支A拉到分支B,并将合并提交C添加到分支B。我已经将最新的更改从分支B拉到分支A,并将合并提交D添加到分支A?
I was going to post an image but I don't have enough reputation for it, so I guess the following illustration will have to do. Two branches continuously running with merges going both directions often. The key thing I am not sure about is how git will play out the commits and will it fill either branch with the commits from the other branch on merges or will it stay clean. I have used rebase before but it seems to end the branch and put all the commits into the master, or I did it wrong. Thanks for the help so far.
master
A--B--C-----H--I--J--M--N
\ / \
mobile \ / \
D--E--F--G--------K--L