Skip to content

Instantly share code, notes, and snippets.

@semihkeskindev
Forked from l1x/git_revert.sh
Created April 14, 2020 09:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save semihkeskindev/5390328d0c2d6ca7765b49713b2e43d8 to your computer and use it in GitHub Desktop.
Save semihkeskindev/5390328d0c2d6ca7765b49713b2e43d8 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