LoginSignup
7

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

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
7