Git Post Merge Cleanup

Clean up everything stale after merges in one pass: local branches fully merged into the default branch, remote-tracking refs whose remote is gone, and worktrees that look "modified" but are already on main. Scans, classifies, presents a clear plan, and only acts on confirmation. Supports `--dry-run` and `--yes`. Use whenever the user mentions cleaning up branches OR worktrees, tidying git state after a batch of PRs landed, or noticing stale debris. Trigger on: "clean up branches", "delete merged branches", "prune branches", "stale branches", "branch cleanup", "remove old branches", "clean up worktrees", "remove old worktrees", "worktree confusion", "phantom modified files", "post-merge cleanup". Also trigger proactively when `git worktree list` shows entries beyond the main worktree, or after a batch of PRs land.

ivy00johns Updated

File contents

ivy00johns/Skill-Madness/tree/main/skills/git/git-post-merge-cleanup commit cd81bce05f

Frequently asked questions

npx skillmds@latest add ivy00johns/git-post-merge-cleanup