Skip to content

Instantly share code, notes, and snippets.

@l1x
Created October 10, 2012 04:38
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save l1x/3863190 to your computer and use it in GitHub Desktop.
Save l1x/3863190 to your computer and use it in GitHub Desktop.
Using git checkout to revert to a certain commit hash
#http://stackoverflow.com/a/6457473/127508
git checkout 56e05fced -- .
git add .
git commit -m 'Revert to 56e05fced'
And to prove that it worked:
git diff 56e05fced
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment