gmc
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 prune

Preview

gmc wt prune --dry-run

PR-aware cleanup

gmc wt prune --pr-aware

Base branch

gmc wt prune -b main

Notes

Use --force only when you accept losing dirty worktree changes.

On this page