简体   繁体   English

Gitflow - 掌握和发展分歧

[英]Gitflow - master and develop diverged

Implemented git branching model as shown below 实现了git分支模型,如下所示

http://nvie.com/posts/a-successful-git-branching-model/ 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) 第1步:合并发布到master(没有快进)

Step 2 : merge release into develop ( no fast forward) 第2步:合并发布到开发(没有快进)

since merge commit from step 1 will not be available for step 2 , develop and master gets diverged. 由于步骤1中的合并提交将不可用于步骤2,因此开发和主控变得分歧。

How to ensure develop and master does not gets diverged. 如何确保发展和掌握不会分歧。 ?

The git-flow model naturally makes develop and master diverge. git-flow模型自然地使developmaster分歧。 There is no way to follow that workflow and ensure that one of develop and master is always an ancestor of the other. 没有办法遵循该工作流程并确保developmaster始终是另一个的祖先。

If you have a look at the commits that are in master and not in develop , you should see only merge commits: 如果您查看master中的提交而不是develop提交,您应该只看到合并提交:

git log develop..master

It means that, if you use the following git-log command, the output should be empty: 这意味着,如果使用以下git-log命令,则输出应为空:

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. 如果您对此答案不满意,请编辑您的问题,以解释为什么它适合您, developmaster不会相互分歧。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Git Branch的开发和掌握有所不同 - Git Branch develop and master have diverged 发布后 Gitflow 在 master 后面开发分支 - Gitflow develop branch behind master after a release Gitflow:将发布错误修复合并回主开发 - Gitflow: Merging release bugfixes back to develop from master 在 GitFlow 中将 master 合并到 develop 会引起冲突吗? - Can merging master into develop in GitFlow ever cause conflict? Gitflow:合并要开发的修补程序分支进行到母版的合并提交 - Gitflow: Merging hotfix branch to develop carries merge commits made to master 开发分支的Gitflow标记? - Gitflow tagging of develop branch? Git图形:将分支显示为线性,而不是显示为master的分支(我认为) - Git graph: develop branch shown as linear instead of as a diverged branch of master (that I think) GitFlow:有没有办法让我的本地 master/develop 分支自动与远程分支同步? - GitFlow: Is there a way to automatically keep my local master/develop branches synced with remote branch? 一旦发布准备好并合并到开发和主版本中,如何处理GitFlow(或其他过程)中的错误修正 - How to deal with a bugfix in GitFlow (or other process) once a release is ready to ship and merged into develop & master 如何在 AzureDevOps 存储库中使用 master 和 develop 上的 PR 分支策略实现/设置 GitFlow? - How do I achieve/setup GitFlow in AzureDevOps repos with PR branch policies on master and develop?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM