how to go back on a commit in git code example Example: git go back to previous commit git checkout 12feg3435 #commit ID