Created
August 29, 2019 12:16
-
-
Save Neoglyph/9dbcab0cbdfd4cb30ccfad2f3021d02b to your computer and use it in GitHub Desktop.
Revert Commit GIT
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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