Skip to content

Instantly share code, notes, and snippets.

@riccardoscalco
Created July 15, 2015 06:44
Show Gist options
  • Save riccardoscalco/129e5b630b7b00522d89 to your computer and use it in GitHub Desktop.
Save riccardoscalco/129e5b630b7b00522d89 to your computer and use it in GitHub Desktop.
Git: revert to an older commit. Get your index and work tree into the desired state, without changing HEAD. http://stackoverflow.com/questions/4114095/revert-to-a-previous-git-commit
$ git checkout 0d1d7fc32 .
$ git commit -m "revert to older commit"
$ git push origin master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment