41
34

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

git commit --amendをキャンセルする

Posted at

amendによるものはいったんcommitして、次に

$ git reset --soft HEAD@{1}

他の方法では

$ git reflog

などでも復帰はできそう

数年使って初めてキャンセルしよう考えたので覚える必要全く無し。
なので戻すことは可能ということだけ覚えた。

参考:How to undo git commit amend

41
34
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
41
34

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?