-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Description
Provide separate delete options for more granular control:
- Delete worktree + branch - Current behavior, removes both
- Delete worktree only - Remove the worktree but keep the branch
- Delete branch only - Available when not on a worktree, removes just the branch
Use Cases
- Keep branch for later work while cleaning up disk space (worktree only)
- Clean up merged branches without worktrees (branch only)
- Full cleanup when done with feature (both)
CLI / Non-TTY Mode Context
When running in non-interactive (non-TTY) environments or via CLI arguments, delete behavior changes:
CLI Usage
git-wt d <branch> # Delete worktree+branch (requires --force in non-interactive)
git-wt d <branch> --force # Force delete without confirmationBehavior
- Interactive mode: Shows gum confirmation prompt before deletion
- Non-interactive mode: Requires
--forceflag, otherwise fails with error - If branch has no worktree,
git-wt dfails with an error
Related to Non-TTY Mode
The delete command is part of the broader CLI argument support:
git-wt [branch]- Switch to/create worktree (prints path by default)git-wt d [branch]- Delete worktree+branch--execflag spawns new shell instead of just printing path--forceflag for non-interactive deletion
Metadata
Metadata
Assignees
Labels
No labels