Skip to content

gtl worktree prune ​

Parent command: gtl worktree.

Remove all secondary worktree locations after confirmation, then prune stale worktree records. Keep the primary worktree and all local branches. The command stops without removing any worktree if one has uncommitted changes.

Usage ​

bash
gtl worktree prune [flags]

Examples ​

bash
gtl worktree prune --dry-run
gtl worktree prune
gtl worktree prune --yes

Full Help ​

text
Remove all secondary worktree locations after confirmation, then prune stale worktree records. Keep the primary worktree and all local branches. The command stops without removing any worktree if one has uncommitted changes.

Usage:
  gtl worktree prune [flags]

Examples:
gtl worktree prune --dry-run
gtl worktree prune
gtl worktree prune --yes

Flags:
      --dry-run   Show what would be removed without making changes
  -h, --help      help for prune
  -y, --yes       Skip confirmation prompt

Released under the MIT License.