Command
git commit --amend
Create a replacement for the current tip, using staged content. Avoid rewriting shared history; preserve a rescue branch first.
Formal Syntax & Structure
git syntaxgit
git commit --amend [-m MESSAGE | --no-edit]Working Example
Example Snippetgit
git commit --amend -m "Correct message"