Skip to content

Latest commit

 

History

History
13 lines (9 loc) · 419 Bytes

File metadata and controls

13 lines (9 loc) · 419 Bytes

Keep the message when amending files in the last commit

I often need to tweak my most recent commit to change its file content, but I don't always want to adjust the commit message.

To quickly amend a commit with changes from the index without being prompted to edit and confirm the message, use the --no-edit option:

git commit --amend --no-edit

Thanks to https://stackoverflow.com/a/10365442/4970