wanted to got back to a previous commit with # all of the files changed on my local machine to be at that commit, so I did git checkout -f ba306ae # which gives the desired effect, you get a nice explanation about having a detached HEAD. # to get back to the final state of the Github repo and fix the local copy so that the HEAD is # no longer detached, I did: git checkout master # that got the HEAD reattached, but my local was behind ‘origin/master’ by some number of # commits. I fixed this by git pull # which got me to a state of my local being up-to-date with ‘origin/master’ pointing to the last # commit of the Github repo which is where I started and where I want to be now.