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] [--stale <days>]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
storefront-auth-fix auth-fix merged, nothing to lose
storefront-docs-typo docs-typo merged, nothing to lose
run 'gitto prune --remove' to delete theseWhat 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.
The ones nobody came back to
An agent that stopped halfway leaves a clone that is dirty, unmerged and never
coming back. Plain prune leaves it there forever, which is correct and also
means a lane nobody is using stays on the list.
--stale <days> adds the clones where nothing has happened for that long:
$ gitto prune --stale 7
storefront-spike-oauth spike-oauth untouched for 23d, and it still holds work
run 'gitto prune --remove' to delete theseWith --remove, a stale clone that still holds work is bundled into the archive
beside the canonical before it goes, exactly as remove --archive does. A stale
clone that holds nothing is simply removed.
sync
Fetches, moves the canonical forward when it can do so without a merge, and then runs whatever the project says brings it up to date. It holds the canonical alone while it runs, so no clone is copied out of a tree that is moving.
doctor
Reports what still points outside a clone after the copy: symbolic links into the canonical, virtual environments holding the old path, submodule history that did not come along, worktrees the clone hosts for someone else, and settings files in fixed places that name the clone by path.