I switched to master after developing on a branch for a long time. The log shows:
Your branch is behind ‘origin/master’ by 167 commits, and can be fast-forwarded.
git checkout HEAD
It doesn’t have any effect. This is because I have checked out an intermediate commit on master.
How can I make master stay on head?
git checkout master git pull origin
will fetch and merge the
origin/master branch (you may just say
git pull as origin is the default).
Answered By – Greg Hewgill