Skip to content

Instantly share code, notes, and snippets.

@bastman
Created November 2, 2018 11:49
Show Gist options
  • Save bastman/7bc6cd6850fede51abeac70d4e5e9f3e to your computer and use it in GitHub Desktop.
Save bastman/7bc6cd6850fede51abeac70d4e5e9f3e to your computer and use it in GitHub Desktop.
git_revert_to_commit_hash.sh
# see: https://gist.github.com/l1x/3863190
#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