From time to time I find myself correcting using the same message.
Typically, I do:
- Add changes to the staging area.
- Do
git commit --amend . - Wait for the text editor to open.
- Save and close it (without changing the message).
In any case, to tell git that I don't want to change the commit message (skip the step of opening a text editor and save the message)? How:
- Add changes to the staging area.
- Tell git to change my staging area to the last commit without asking for another message.
I know that I can avoid git starting my text editor by doing git commit --amend -m "<message>" . But that way I would have to retype the message.
git git-commit amend
talles Mar 18 '13 at 14:44 2013-03-18 14:44
source share