commit-fixup

Solid

Absorb uncommitted working tree edits into the existing commits on the current branch where each change belongs (fixup commits + autosquash rebase). Use on requests like 'fold this into the original commit', 'clean up the commit history', 'squash the review fixes into their commits', 'fixup', 'amend into an existing commit', or when review feedback and polishing edits need to land in the right commit. Not for reordering commits already in history, and not for splitting a commit apart.

Code & Development 17 stars 1 forks Updated 2 weeks ago MIT

Install

View on GitHub

Quality Score: 79/100

Stars 20%
42
Recency 20%
90
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

# commit-fixup Absorb uncommitted changes into the existing commit each one should have been part of, leaving clean history. Four stages: safety checks → mapping → scope confirmation → execution and verification. This rewrites history, so don't skip any stage's checks. ## 1. Safety checks ```bash git status --short # uncommitted changes git merge-base HEAD origin/<default-branch> # establish base (use the repo's default branch) git log --oneline <base>..HEAD # commits in scope git branch -vv # upstream and push state git log --merges --oneline <base>..HEAD # merge commits in range git --version ``` Tell the user before proceeding if any of these hit: - **Branch already pushed → stop and ask.** Rebasing means a force-push afterwards, and only the user makes that call. Never run a force-push on your own. - **Merge commits in range → stop.** The rebase flattens the merge structure. - **git older than 2.44 → don't proceed.** That version lacks the non-interactive `git rebase --autosquash` this skill relies on. Say the git version is too old to automate this safely and point at an upgrade (macOS: `brew upgrade git`, Ubuntu: `apt upgrade git`). - Untracked files are not absorption targets. Leave them alone. ## 2. Mapping: find the target commit for each changed file For each modified file, find the commit in branch range that **touched it last**: ```bash git log --oneline <base>..HEAD -- <file> | head -1 ``` ...

Details

Author
2ykwang
Repository
2ykwang/agent-skills
Created
6 months ago
Last Updated
2 weeks ago
Language
Python
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category