Created
November 30, 2014 10:36
-
-
Save euyuil/1947f7d0fd73eb39f36f to your computer and use it in GitHub Desktop.
Git: undo last 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
# 这个还能保留上一次的更改。 | |
git reset --soft HEAD^ | |
# 这个不能保留上一次的更改。 | |
git reset --hard HEAD^ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment