Skip to content

Glossary: Command Line and Git

git commit --amend

Also written: amend, --amend

Replaces the last commit with a corrected one, to fix a message or add a forgotten file. It changes the hash, so don't use it on commits you've already pushed.

Where the book teaches it

Related terms

commitgit revertgit push