There is a branch on a remote git repository where ultimately I want to fetch locally, then merge the work in - nothing unusual there.
I suspect there may be a merge conflict - so rather than issue git pull origin/<branch_name>
, I want to take a look at the code on that remote branch before I try merge it into My local branch.
So what I tried was:
git fetch origin
I believe that means I now have a copy of the read only remote tracking branch, then I didgit checkout origin/<branch_name>
To try checkout and look at the contents of the remote branch.
It has worked, but I'm getting some messages like
HEAD is in a detached state
Previous HEAD position was c293198
and My vim fugitive is reporting the current branch as a hash fragment like a697b40
.
Which makes me suspect I'm doing it wrong.
Is there a more "proper" way to inspect the contents of a remote branch before attempting a merge?