10
7

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 --ammend する

Posted at

直前のコミットをやり直す git commit --amend は便利なんだけど、同じコミットメッセージでいい時でもいちいちエディタ立ち上がるので、:poop: だなって思うとき度々ありました

同じコミットメッセージでよくて、エディタ立ち上げるの :poop: なときは

$ commit --amend -C HEAD

で直前のコミットメッセージでamendしてくれるので、 :innocent:

さらに、reamend として エイリアス登録すればマジ :innocent::innocent::innocent::innocent:

~/.gitconfig
[alias]
  reamend = commit --amend -C HEAD
10
7
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
10
7

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?