Look at the git log: git log -n 5 --oneline Pick up a commit id and reset: git reset --hard 'commit id'