I'm seeing the following graph in SourceTree. I have the 'dev' branch checked out, and I don't understand why I'm pointing to the commit that's highlighted in blue, instead of the commit at the top of the list.
The graph suggests that the commit at the top of the list has been commited on the dev branch (although I always find the SourceTree graph confusing, I'm not sure if this is actually what the graph is telling me). If I do:
git checkout dev
git reset --hard head
then I'm still on the same commit that's highlighted in blue. Also I'm unclear on why the master branch is showing a marker of 'origin/HEAD'. Shouldn't the commit at the top of the list be marked 'origin/HEAD'. What's going on here, and is there something I need to do to fix this?
The graph suggests that the commit at the top of the list has been commited on the dev branch
This is an incorrect reading of the graph. The dev
branch contains the commit with the message "Merged in FD-50-Reboot-scheduler" and the connected ones below it. It does not contain any of the commits above.
The top commit is on a branch named origin/Demo-fake-data
.
Also I'm unclear on why the master branch is showing a marker of 'origin/HEAD'. Shouldn't the commit at the top of the list be marked 'origin/HEAD'. What's going on here, and is there something I need to do to fix this?
HEAD
is a special name for the currently checked out commit. origin/HEAD
is the commit that is checked out on the remote named origin
. There is nothing to fix here. If you are working on a team, you shouldn't mess with the remote repo at all unless you have been assigned that responsibility.