Created
June 11, 2018 19:06
-
-
Save felipekm/f26b446f94015d67f41c3f7e43cb280b to your computer and use it in GitHub Desktop.
Git - revert to specific commit
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
# Resets index to former commit; replace '56e05fced' with your commit code | |
git reset 56e05fced | |
# Moves pointer back to previous HEAD | |
git reset --soft HEAD@{1} | |
git commit -m "Revert to 56e05fced" | |
# Updates 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