← ClaudeAtlas

interactive-rebase-cleanuplisted

Use when the user has a messy commit history (e.g. many "wip", "fix typo", "oops" commits) on a branch and wants it cleaned up before merging, via interactive rebase. Triggers on phrases like "clean up my commits", "squash these commits", "make my history readable before I open a PR".
Thelavdevawasthi/claude-git-skills · ★ 0 · Code & Development · score 70
Install: claude install-skill Thelavdevawasthi/claude-git-skills
# Interactive Rebase Cleanup ## When to use this - The user shares a `git log --oneline` output with obviously messy commits (typo fixes, "wip", duplicate small commits) and wants a clean history before merging. - The user asks how to squash, reorder, or reword commits. ## Steps 1. **Review the commit list** the user provides and classify each commit: - Keep as-is (a real, self-contained, well-described change) - Squash into the previous commit (fixup/typo/small correction commits) - Reword (the change is fine but the message is bad — e.g. "wip", "fix") - Reorder (logically belongs elsewhere in the sequence) 2. **Propose a plan**, not just raw commands — explain which commits you're merging together and why, so the user can sanity-check it before running anything. 3. **Give the exact interactive rebase command** to start: ``` git rebase -i HEAD~N ``` where `N` is the number of commits back from HEAD that covers the whole range being cleaned up. 4. **Show the exact rebase todo list** the user should end up with, using the correct verbs: - `pick` — keep as-is - `squash` (or `s`) — combine into previous commit, keep both messages for editing - `fixup` (or `f`) — combine into previous commit, discard this commit's message - `reword` (or `r`) — keep commit, edit its message - Reordered lines — just move them to the desired position in the list 5. **Warn clearly if the branch has already been pushed and shared** — rewriting history on a