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

  1. Verify the last commit has not been pushed to remote:
  2. If there are additional file changes to include:
  3. Decide whether to update the commit message:
  4. Verify the amended commit looks correct:
  5. 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.