简体   繁体   English

git pull在两个不同的origin / master分支之间交替

[英]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.

相关问题 git pull在两个消息之间交替,一个告诉我关于origin / HEAD(强制更新)和一个告诉我有关origin / master的消息 - git pull alternates between two messages, one telling me about origin/HEAD (forced update) and one telling me about origin/master git pull origin master 和 git pull origin/master 的区别 - Differences between git pull origin master & git pull origin/master Git拉起源大师 - Git pull origin master 主分支和开发分支之间的“git pull”或“git merge” - “git pull” or “git merge” between master and development branches Git:两​​个子目录,如何从不同分支中拉出并推送到一个主分支 - Git: Two subdirectories, how to pull from different branches and push to one master branch 为什么“git pull”从存储库中获取所有分支而“git pull origin master”不这样做? - Why does “git pull” get all branches from repository but “git pull origin master” not do so? git merge origin / master和git pull之间的区别 - difference between git merge origin/master and git pull 使用git pull和git push命令在origin master和origin / master之间进行区分 - Difference between origin master & origin/master with git pull and git push commands Git 分支命名标准:origin, origin/master origin master - Git branches naming standards: origin, origin/master origin master Git Pull Origin Master失败 - Git pull origin master failing
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM