Git Clean Worktrees

Clean up stale git worktrees whose work is already on the main branch. Worktrees accumulate after branches are merged — they sit around with "modified" files that look like uncommitted work but are actually already on main. This causes confusion ("did I forget to merge this?") and clutters git status. Use this skill whenever the user mentions stale worktrees, worktree cleanup, leftover worktrees, "clean up workspaces", or when you notice orphaned worktrees during other git operations. Also trigger on: "worktrees keep getting left behind", "is this merged", "clean up worktrees", "remove old worktrees", "worktree confusion", or any mention of phantom modified files in worktree directories. Trigger proactively when `git worktree list` shows entries beyond the main worktree, especially before or after branch cleanup operations.

ivy00johns Updated

File contents

ivy00johns/Skill-Madness/tree/main/skills/archive/git-clean-worktrees commit 3b252833a0

Frequently asked questions

npx skillmds@latest add ivy00johns/git-clean-worktrees