Git · Everyday workflow
git commit --amend
Replaces the last commit, for example to fix the message. Do not amend commits that others have pulled.
Syntax
git commit --amendExample
Example
git add forgotten-file.ts git commit --amend --no-edit
More in this group
Learn this in the course
Reference pages are the quick answer. The course explains the why, shows the full example and ends with a challenge.