Gitflow - 掌握和发展分歧 [英] Gitflow - master and develop diverged

查看:96
本文介绍了Gitflow - 掌握和发展分歧的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

实现git分支模型,如下所示



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

但我的分支开发并且master在这些步骤之后得到分歧

第1步:合并发布到master(不快进)

步骤2:合并发布到开发(不快进)



因为步骤1的合并提交将不可用于步骤2,开发和主分支得到分离。



如何确保开发和掌握不会分化。 git-flow 模型自然会使<$ c $> c> develop 和 master diverge。没有办法遵循该工作流程,并确保开发 master 之一始终是另一个的祖先。



如果您查看 master 中的提交,而不是开发中的提交,你应该看到只有合并提交:

  git log develop..master 

这意味着,如果您使用以下 git-log 命令,输出应该是空的:

  git log --no-merges develop..master 
开发>

/ code>和 master 不会彼此偏离。


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. ?

解决方案

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.

这篇关于Gitflow - 掌握和发展分歧的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆