取り消したコミットの内容を確認する(git resetしたが)その取り消したコミットの内容を確認する方法 1git reset --soft HEAD^ git show ORIG_HEAD 方法 2vi test.txt # (1) test.txtを修正する。 git add test.txt # (2) これをステージングして、 git commit -am 'fixed' # (3) コミットする。 git reset --hard HEAD^ # (4) このコミットを取り消す。 vi test.txt # (5) 再度、test.txtを修正する。 git diff ORIG_HEAD test.txt # (6) (1)の修正とのdiffを見る。 |
|