I just fetched from origin and git status reports:
Your branch is behind origin/ by 13 commits, and can be
fast-forwarded
Strictly speaking, what does this exactly mean? Does it mean:
-
that
HEADis behind the corresponding remote-tracking-branch (origin/<branch_name>). -
or that
<branch_name>is behind the corresponding remote-tracking-branch (origin/<branch_name>)?
What if I am on a detached HEAD? (i.e. if my HEAD and <branch_name> don’t point to the same commit).
Is there a way to visualize these pointers (HEAD, <branch_name> and origin/<branch_name> on a graph? I have tried with git log --graph, but I think I only see the different commits and they merge overtime.
Let’s look at an example. This repository has a remote called
originwith a branch calledmaster. I also have a branch calledmasterwhich I currently have checked out.When I run
git statusit tells me that my branchmasteris behindorigin/masterby two commits.