Created
June 6, 2014 11:39
-
-
Save rameshanandakrishnan/b18181d3fb0c18351ab1 to your computer and use it in GitHub Desktop.
Rolling back to a specific commit
This file contains 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
#To roll back to specific commit | |
# 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