Git Clean Worktrees

Remove git worktrees safely without force.

motlin Updated

File contents

Git Clean Worktrees

Remove the requested worktrees only if Git can do so without --force.

Do not pre-check status or unpushed commits. Run:

git worktree remove <worktree>

If Git refuses, report the error. Do not use --force unless the user explicitly asks for a destructive operation.

motlin/claude-code-plugins/tree/main/plugins/git/skills/git-clean-worktrees commit 7fa8acf161

Frequently asked questions

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