Amending
Amending is the process of updating the most recent commit with new changes. This is useful when you forgot to include a file or a change, or made a mistake in the commit message. Amending creates a new commit with the updated changes, replacing the previous commit.
Use Cases:
Examples:
Fixing a typo in the last commit message:
git commit --amend -m "New commit message"
Adding/updating specific files in the last commit:
# Add the file(s) to the staging area
git add [filename]

# Amend to the previous commit without editing the commit message
git commit --amend --no-edit