Git Cheat Sheet/Amend last commit without editing message

Add staged changes into the previous commit.

Section: Snapshotting and Commits

Amend last commit without editing message

bash
bash
git commit --amend --no-edit

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Snapshotting and Commits
Commit staged changes
Create a commit with a message.
OpenIn sheetbashsame section
Commit tracked changes
Commit tracked file modifications without separate add.
OpenIn sheetbashsame section
Create fixup commit
Prepare a fixup for autosquash rebase.
OpenIn sheetbashsame section
Create empty commit
Record an empty commit, often for automation.
OpenIn sheetbashsame section
Status short format
Compact status listing.
OpenIn sheetbashsame section
Status with branch info
Short status plus branch tracking summary.
OpenIn sheetbashsame section