Introduction
Sometimes you make a commit and realize you forgot to add a file or want to change the commit message. Amending the last commit lets you fix that without making a new commit.
When you forgot to include a file in your last commit and want to add it.
When you want to correct a typo or improve the message of your last commit.
When you want to combine small changes into the previous commit to keep history clean.
When you accidentally committed with the wrong message and want to fix it before pushing.
When you want to update the last commit with new changes before sharing your work.