git:amend
Installation
SKILL.md
Amend Commit
Modifies the most recent commit by adding staged changes, updating the message, or both. Follows Conventional Commits specification for message formatting.
When to use
Use this skill when the user needs to:
- Add forgotten files to the last commit
- Fix a typo in the last commit message
- Combine small fixes into the previous commit
- Update commit message to follow conventions
Instructions
Step 1: Check Current State
- Run
git log -1 --pretty=format:"%h %s"to show the last commit - Run
git diff --cached --statto see if there are staged changes - Run
git diff --statto see unstaged changes