It's a little complex. git reset --hard will remove all of your changes back to your last commit if you have not commited anything. If you have edited just one file, just do a git checkout -- <filename>. Otherwise, for a particular commit, you can do a git revert <hash> if you want to move back to a previous commit.