git_worktree_remove
Remove a Git worktree when a ticket is complete. Safely deletes the directory and blocks removal if uncommitted changes exist unless force is enabled.
Instructions
End a hop (remove git worktree). Safely removes the worktree directory. Refuses if there are uncommitted changes unless force=true. Use when done with a ticket.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| slug | No | Combined with ticket to identify specific worktree. | |
| force | No | Force removal even if worktree has uncommitted changes. | |
| prune | No | Also prune the worktree reference from git. | |
| branch | No | Branch name to find and remove the worktree for. | |
| dryRun | No | If true, return what would be removed without actually removing it. Shows dirty status and branch info. | |
| ticket | No | Ticket ID to find and remove the worktree for. | |
| repoPath | No | Any path inside the git repository. | |
| worktreePath | No | Direct path to the worktree to remove. | |
| allowMainWorktree | No | Allow removing the main worktree (dangerous). |