Worktree
Prune
Remove worktrees whose branches are merged.
gmc wt prune removes worktrees whose branches are already merged into the base branch.
Usage
gmc wt prunePreview
gmc wt prune --dry-runPR-aware cleanup
gmc wt prune --pr-awareStale local branches
Merged branches that no longer have a worktree are left alone by default. Add
--branches to delete them as well; combine with --pr-aware when the repository
uses squash merges, since ancestry checks cannot see those.
gmc wt prune --branches --pr-aware --dry-run
gmc wt prune --branches --pr-awareUse gmc wt prune --all --pr-aware --dry-run to preview cleanup across repositories with linked worktrees in the home directory.
Base branch
gmc wt prune -b mainNotes
Use --force only when you accept losing dirty worktree changes.