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 ce-clean-gone-branchesbash scripts/clean-gonegit fetch --prunegit branch -vv: gone]__NONE__These local branches have been deleted from the remote:
- feature/old-thing
- bugfix/resolved-issue
- experiment/abandoned
Delete all of them? (y/n)AskUserQuestionToolSearchselect:AskUserQuestionrequest_user_inputask_userask_userpi-ask-usergit worktree list | grep "\\[$branch\\]"git worktree remove --force "$worktree_path"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.