[英]After merge of release branch, why is master 1 commit ahead of develop?
I am still new to this so I am trying to understand why master
ends up 1 commit ahead of develop
instead of the same after merging a release
branch back into develop
and master
. 我对此还很陌生,所以我试图理解为什么
master
在develop
之前将1提交最终提交到develop
而不是在将release
分支合并回develop
和master
之后提交相同的提交。
My develop
branch was 5 commits ahead of master, then I created a release
branch and tagged which was also 5 commits ahead of master
, then I merged release
branch back into develop
and master
but master
ends up 1 commit ahead of develop
. 我的
develop
分支比master提前5次提交,然后我创建了一个release
分支并进行了标记,这也是master
之前的5次提交,然后我将release
分支合并回develop
和master
但是master
在develop
之前先完成了1次提交。
Is this because no changes were made to the release
branch and it was the same as develop
so the merge didn't create a commit on develop
but it did on master
which makes master
1 commit ahead even though master
and develop
now are the same at this point? 这是因为没有变化的制作
release
分支,它是一样的develop
因此合并没有创建提交上develop
,但它做了master
,这使得master
1犯提前即使master
和develop
正处在同一这点?
Is this ok? 这个可以吗? Will this cause any problems?
这会引起任何问题吗?
The issue is that the merge commit is being detected. 问题是正在检测到合并提交。 Your commit history probably looks something like this:
您的提交历史可能看起来像这样:
*------------------ A [master]
\ /
*---*---*---*---B [develop,release]
Commit B
is, as you mention, 5 commits ahead of master
. 正如您所提到的,提交
B
比master
提交5次。 When you merged the release branch back into master
, this created a merge commit, A
. 当您将发布分支合并回
master
,这将创建一个合并提交A
That merge commit does not yet exist in develop
. 这合并提交不存在尚未
develop
。
This is not something that you need to worry about, because the merge commit doesn't contain any changes itself, it only merges the two histories together. 这不是您需要担心的事情,因为合并提交本身并不包含任何更改,它只会将两个历史记录合并在一起。 Normally, that commit will automatically end up in
develop
next time you finish a hotfix
branch anyway. 通常,下次您仍然要完成
hotfix
分支时,该提交将自动在develop
结束。
IMO that 1 commit ahead is compared to origin/master or the remote branch your master is tracking. 将1个提交前面的IMO与源/主服务器或您的主服务器正在跟踪的远程分支进行比较。 Since you have do a merge on local branch, it will create a new commit for that merge on your local master, therefore makes it 1 commit ahead.
由于您已经在本地分支上进行了合并,因此它将在本地主服务器上为该合并创建一个新的提交,因此使其提前1次提交。
现在,您必须快速发展为大师才能在同一水平上拥有大师和发展
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.