skomp
skomp

Reputation: 459

git pull alternates between two different origin/master branches

I'm currently working on a git repository where something went wrong. 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.

Upvotes: 3

Views: 374

Answers (1)

VonC
VonC

Reputation: 1324318

You seem to have both a remote master branch and a remote HEAD (a bit like in this thread).

git push origin :HEAD

should take care of that.

Upvotes: 5

Related Questions