Gitflow - master and develop diverged

2019-06-11 21:53发布

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条回答
一夜七次
2楼-- · 2019-06-11 22:03

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.

查看更多
登录 后发表回答