Worktree Cleanup

Tear down finished git worktrees safely - verify each branch is merged and its tree is clean, then remove the worktree, delete the branch, and prune. Sweeps every merged-and-clean worktree at once, or targets one branch. Use when the user wants to clean up, tear down, close out, or remove a worktree or workstream, says "worktree cleanup", "sweep merged worktrees", "remove finished worktrees", or asks to delete a finished branch's directory. Delegates to the repo's own scripts/rm-worktree.sh when one exists, and otherwise runs the equivalent gated steps directly.

jelbirt 419fa24 4.8 KB Updated

File contents

jelbirt/LLM-Skill-Build/tree/main/worktree-cleanup commit 419fa24ea1

Frequently asked questions

npx skillmds@latest add jelbirt/worktree-cleanup