prune

Lists the clones whose branch is already merged into the canonical's upstream and which hold nothing uncommitted or unpushed. With `--remove`, it removes them.

gitto prune [--remove]

Lists the clones whose branch is already merged into the canonical's upstream and which hold nothing uncommitted or unpushed. With --remove, it removes them.

$ gitto prune
auth-fix          merged into origin/main
docs-typo         merged into origin/main
2 clones can go. Pass --remove to remove them.

What it leaves alone

A clone with uncommitted changes, a clone with commits no remote has, a clone on a branch that is not merged, and a clone whose submodules host the history of worktrees living outside it. Each of those is what remove refuses, and prune refuses the same things without saying a word about them.

On this page