Gitflow - master and develop diverged

℡╲_俬逩灬. 提交于 2019-12-08 09:38:55

问题


Implemented git branching model as shown below

http://nvie.com/posts/a-successful-git-branching-model/

But my branch develop and master gets diverged after these steps

Step 1 : merge release into master ( no fast forward)

Step 2 : merge release into develop ( no fast forward)

since merge commit from step 1 will not be available for step 2 , develop and master gets diverged.

How to ensure develop and master does not gets diverged. ?


回答1:


The git-flow model naturally makes develop and master diverge. There is no way to follow that workflow and ensure that one of develop and master is always an ancestor of the other.

If you have a look at the commits that are in master and not in develop, you should see only merge commits:

git log develop..master

It means that, if you use the following git-log command, the output should be empty:

git log --no-merges develop..master

If you are not satisfied by this answer, please edit your question to explain why it maters for you that develop and master do not diverge from each other.



来源:https://stackoverflow.com/questions/23491079/gitflow-master-and-develop-diverged

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