All skills
Skillintermediate
amend
Amend the most recent commit with additional changes or an updated message.
Claude Code Knowledge Pack7/10/2026
Overview
Amend the most recent commit with additional changes or an updated message.
Steps
- Verify the last commit has not been pushed to remote:
- If there are additional file changes to include:
- Decide whether to update the commit message:
- Verify the amended commit looks correct:
- If the original commit was already pushed:
Format
Amended Commit: <hash>
Message: <commit message>
Files Changed: <list>
Force Push Required: <yes|no>
Rules
- Never amend a commit that has been pushed without explicit user approval.
- Always verify no unintended changes are included in the amendment.
- Preserve the original commit type (feat, fix, etc.) unless instructed otherwise.