简体   繁体   English

Bitbucket表示分支已合并,但是代码丢失并且git没有合并记录

[英]Bitbucket says the branch is merged, but the code is missing and git has no record of the merge

One member of my team created a branch and made some code changes there. 我团队的一个成员创建了一个分支,并在那里进行了一些代码更改。 He then created a pull request in bitbucket for his branch. 然后,他在bitbucket中为其分支创建了一个拉取请求。 After couple of days, he approved the pull request and Merged it to the main branch via bitbucket. 几天后,他批准了请求请求,并通过bitbucket将其合并到主分支。 So now bitbucket says that the branch is merged, but when I go to the main branch, the code isn't there. 所以现在bitbucket表示分支已合并,但是当我转到主分支时,代码不存在。 And bitbucket still says that it's merged. 而且bitbucket仍然说它已经合并了。

I thought that someone by error reverted those changes, but I checked in Git history and there is no record at all of this commit, so that's not it. 我以为某个人会错误地还原了这些更改,但是我检查了Git历史记录,并且在所有提交中都没有记录,所以不是。 What's going on? 这是怎么回事? I'm really worried that this has happened for other branches as well, that we've closed them thinking they are merged when in fact they weren't. 我真的很担心其他分支机构也发生了这种情况,我们已经关闭了它们,以为实际上它们不是合并在一起的。

That should only happen if the merge was done with the --ours option. 仅当使用--ours选项完成合并时,才会发生这种情况。

It would ignore any change coming from the source branch, while recording a merge. 在记录合并时,它将忽略来自源分支的任何更改。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM