Moving refs around
suggest changegit reset --hard <commit> moves the current branch to that commit. It also resets the index and working tree, and discards uncommitted work in both.
Moving MyBranch to b8dc53:
$ git checkout MyBranch # moves HEAD to MyBranch
$ git reset --hard b8dc53 # makes MyBranch point to b8dc53
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents