Question

As you can see from the picture below, in my remote repository origin/HEAD is not in the same position in history as origin/master. This is not intended so obviously I must have done something wrong.

In other questions such as this

git doesn't seem to pull all updates - HEAD and origin/HEAD in different positions

and this

My git branch is showing 'origin/master' and 'origin/HEAD' in Sourcetree and I don't know how to merge the two

people are saying in their answers that origin/HEAD is "not important".

However I'm not satisfied by this explanation. WHY is it not important? What are the implications of my situation? How can I fix it (if there is anything to fix), maybe just by fetching from the remote as someone suggests in the linked answers?

Also, here What is HEAD in Git? the accepted answer cites a situation known as detached head; however in the documentation here http://git-scm.com/docs/git-checkout#_detached_head the case described is the opposite, where HEAD refers to a newer commit, compared to the one referenced by master. So I'm not sure that my situation can be described as detached head.

origin/head is behind while origin/master is updated

Was it helpful?

Solution

ORIG_HEAD does not indicate the HEAD of origin.

ORIG_HEAD marks the previous location of your HEAD, before an operation like rebase was performed. See more about it here: HEAD and ORIG_HEAD in Git

You can disable the visibility of ORIG_HEAD in the View Menu of History, disable 'Show->Additional Refs'

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top