git-squash-merge
Installation
SKILL.md
git-squash-merge
Overview
This skill implements a specific workflow for squashing all changes since a target commit into one clean commit:
- Commit pending changes
- Save current HEAD hash
- Hard reset to target commit
- Squash merge the saved changes
- Generate clean commit message and commit
Warning: This uses git reset --hard which is destructive. Only use when user explicitly requests via trigger phrase. Old commits remain in reflog.
Workflow Instructions
1. Initial Analysis
- Run
git statusto check for uncommitted changes - Run
git log --oneline -5to understand recent history - Identify the target hash from user message