- Run
git gtr listto list all worktrees. - For each worktree branch that is NOT the default branch (e.g. main), run
git gtr rm --force {branch}to remove it. - Run
git pull --pruneto fetch latest changes and prune deleted remote branches.
Clean worktrees is an AI agent skill from the GitHub repository dyoshikawa/rulesync. Clean git worktrees created by git-worktree-runner
.claude/skills/clean-worktrees/SKILL.md.cursor/rules/clean-worktrees.md.agents/skills/clean-worktrees/SKILL.mdgit gtr list to list all worktrees.git gtr rm --force {branch} to remove it.git pull --prune to fetch latest changes and prune deleted remote branches.