Skip to content

Instantly share code, notes, and snippets.

@luiarthur
Last active March 8, 2019 22:42
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 luiarthur/e76cfbd22de6750cb5df071d4694c0d4 to your computer and use it in GitHub Desktop.
Save luiarthur/e76cfbd22de6750cb5df071d4694c0d4 to your computer and use it in GitHub Desktop.
git checkout [revision] .
# where [revision] is the commit hash (for example: 12345678901234567890123456789012345678ab).
# Don't forget the . at the end, very important.
# See: https://stackoverflow.com/questions/2007662/rollback-to-an-old-git-commit-in-a-public-repo
# Other useful commands
# Show which files were changed
git log --raw
# It's probably a good idea to checkout previous versions in a new branch. Make
# sure everything looks right. Then merge the branch into master.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment