[英]Git hotfix merging to master and master to develop
If I have two branches: master and develop . 如果我有两个分支: 掌握和发展 。 All the releases come from the master branch and all features are developed from the develop branch. 所有版本来自主分支,所有功能都在开发分支上开发。
If I create a hotfix branch from master and then merge it back to master I think I have two options from there: 如果我从master创建一个修补程序分支,然后将其合并回master,我想我有两个选择:
My question is what is the difference and what kind of problems I might have going with either one? 我的问题是,两者的区别是什么?我可能会遇到什么样的问题?
In theory, there should be absolutely no difference. 从理论上讲,绝对没有区别。
Once you've merged the hotfix
branch in to master
, master
and the tip of the hotfix
branch are at exactly the same point. 将hotfix
分支合并到master
, master
和hotfix
分支的尖端就在同一点。
So whether you merge master
or hotfix
in to develop
, you end up with the same outcome. 因此,无论您将master
或hotfix
合并进行develop
,最终都会得到相同的结果。
Having said that, I personally think you should go with option 1. 话虽如此,我个人认为您应该选择选项1。
With master
being for release only, I feel you should never merge from master
back in to develop
, only from develop
in to master
. 随着master
是只释放,我觉得你应该从来没有从合并master
回来到develop
,只能从develop
到master
。
Keeping this flow one way helps keep things in order. 以一种方式保持这种流动有助于使事情井然有序。 You know in your head you can't make any changes directly on master
, as you won't have a way of getting them back in to develop
. 您知道,您无法直接在master
上进行任何更改,因为您将无法使它们重新投入develop
。 You either have to hotfix
and merge in to both, or create a feature on develop
. 要么你有hotfix
和合并到这两个,或创建一个功能develop
。
Hope that helps! 希望有帮助!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.