Last active
December 10, 2015 04:08
-
-
Save devlights/4379484 to your computer and use it in GitHub Desktop.
[git] 一度コミットしてしまったものをコミット直前の状態に戻す, reset操作などを間違えてしまった後でresetする前に戻す
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 --hard HEAD^ | |
# reset操作などを間違えてしまった後で、resetする前に戻す | |
git reflog | |
git reset --hard "HEAD@{1}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment