6

Possible Duplicate:
Can I skip the commit message step when I run git commit --amend?

Is there a way to do a git commit --amend that automatically uses the old commit message instead of prompting us to edit the old one?

I know I just need to type in <ESC>:q but if there was some other argument I'd pass in the git commit, I'd prefer it that way.

Thanks!

Community
  • 1
  • 1
devoured elysium
  • 101,373
  • 131
  • 340
  • 557

1 Answers1

22

Sure:

git commit --amend -C HEAD
Brian Campbell
  • 322,767
  • 57
  • 360
  • 340
  • 1
    I recommend making this into an alias, so then you can just go `git amend` (or more often, `git amend -a`. Obviously you could include the -a in the alias if you want) – Tyler Apr 23 '11 at 18:48