[英]git pull alternates between two different origin/master branches
I'm currently working on a git repository where something went wrong. 我目前正在开发一个出错的git存储库。 Everytime I perform a pull, the origin alternates between two different master branches: 每次执行拉动时,原点在两个不同的主分支之间交替:
git pull
From git://git.eclipse.org/gitroot/m2t/org.eclipse.xpand
+ 9a557eb...32d3b15 HEAD -> origin/HEAD (forced update)
git pull
From git://git.eclipse.org/gitroot/m2t/org.eclipse.xpand
32d3b15..9a557eb master -> origin/master
So yeah, I know, there has been a rewrite and that one should not rewrite the history. 所以,是的,我知道,有一个重写,不应该重写历史。 Anyway, I can't change that anymore, and now I get this strange behaviour. 无论如何,我不能再改变它了,现在我得到了这种奇怪的行为。 Does anyone have any idea on how to fix this problem and why this happens? 有没有人知道如何解决这个问题以及为什么会这样? Besides: refs/remotes/origin/HEAD does point to refs/remotes/origin/master in both cases, but the origin/master SHA alternates. 此外:refs / remotes / origin / HEAD在两种情况下都指向refs / remotes / origin / master,但是origin / master SHA交替出现。
You seem to have both a remote master
branch and a remote HEAD
(a bit like in this thread ). 你似乎有一个远程master
分支和一个远程HEAD
(有点像这个线程 )。
git push origin :HEAD
should take care of that. 应该照顾好。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.