Loading...
Loading...
Clean up local branches whose remote tracking branch is gone. Use when the user says "clean up branches", "delete gone branches", "prune local branches", "clean gone", or wants to remove stale local branches that no longer exist on the remote. Also handles removing associated worktrees for branches that have them.
npx skill4agent add everyinc/compound-engineering-plugin git-clean-gone-branchesbash scripts/clean-gonegit fetch --prunegit branch -vv: gone]command git__NONE__These local branches have been deleted from the remote:
- feature/old-thing
- bugfix/resolved-issue
- experiment/abandoned
Delete all of them? (y/n)AskUserQuestionrequest_user_inputask_usercommand git worktree list | grep "\\[$branch\\]"command git worktree remove --force "$worktree_path"command git branch -D "$branch"Removed worktree: .worktrees/feature/old-thing
Deleted branch: feature/old-thing
Deleted branch: bugfix/resolved-issue
Deleted branch: experiment/abandoned
Cleaned up 3 branches.command gitcommand git