Skip to content

Instantly share code, notes, and snippets.

@Neoglyph
Created August 29, 2019 12:16
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 Neoglyph/9dbcab0cbdfd4cb30ccfad2f3021d02b to your computer and use it in GitHub Desktop.
Save Neoglyph/9dbcab0cbdfd4cb30ccfad2f3021d02b to your computer and use it in GitHub Desktop.
Revert Commit GIT
# Reset the index to the desired tree
git reset HASH
# Move the branch pointer back to the previous HEAD
git reset --soft HEAD@{1}
git commit -m "Revert to HASH"
# Update working copy to reflect the new commit
git reset --hard
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment