Last active
January 18, 2016 08:55
-
-
Save WebDevJL/aeb3f4551e68b7f0eede to your computer and use it in GitHub Desktop.
Git: reset repo to given 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
# Reset the index to the desired tree | |
git reset 56e05fced | |
# Move the branch pointer back to the previous HEAD | |
git reset --soft HEAD@{1} | |
git commit -m "Revert to 56e05fced" | |
# 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