Worktree board and agent states

The Worktrees tab shows every worktree of the current repository as a card, sorted into columns by what it is doing. When coding agents work in worktrees, this is where you see which ones are still setting up, which have changes, which are ready to push and which can go.

Where to find it

  • Worktrees tab at the top of the window, or ⌘3.
  • View › Worktrees, or Command palette › Show worktrees.
  • Sidebar footer: "N worktrees" with Show all.
The worktree board: columns for Working, Ready for review and Merged or gone, each worktree a card with its branch, state and changes.

The header

The heading reads "Worktrees", then a line such as "4 worktrees of api, 2 with changes". To its right:

ControlWhat it does
Clean up NAppears when some worktrees are merged, gone or missing. Opens the clean-up sheet.
Layout: Board, Grid, ListBoard is columns by status. Grid is cards, most recent first. List is a table of every worktree. The choice is remembered. Default: Board.
GearWorktree settings: folder pattern, setup recipe, and how coding agents use worktrees. See Worktrees and worktree setup.
New worktreeOpens the New worktree sheet (⌘N).

Columns

ColumnHoldsWhen it is empty
WorkingWorktrees that are setting up, paused in an operation, or have uncommitted changes, and clean worktrees that are behind or up to date with their upstream."None right now."
Ready for reviewClean worktrees with commits to push, or with no upstream yet."None right now."
Merged or goneWorktrees whose branch is merged into the default branch, whose branch is gone from the remote, or whose folder is missing."Nothing to clean up."

The default branch is origin/HEAD, or main, master or trunk if the remote has no HEAD. A worktree counts as merged when its branch is in git branch --merged against the default branch and isn't sitting at the default branch's tip (unless the remote branch is gone).

States

Each card carries a pill with one of these states, in this order of priority.

StateMeaning
Setting upThe setup recipe is still running. The card lists the steps and the last four lines of output.
Merge paused, Rebase paused, Cherry-pick paused, Revert pausedAn operation stopped in that worktree, usually on a conflict.
Folder is missingGit still knows the worktree but its folder has been deleted.
MergedThe branch is merged into the default branch.
Branch gone on the remoteThe upstream branch no longer exists.
Agent: ready for reviewA coding agent marked the worktree for review through pond. The card sits in Ready for review whatever Git says about pushes, and shows the agent's note.
Agent: doneThe agent marked it done. Also in Ready for review.
Agent workingThe agent marked it working, or made it through pond and hasn't stopped yet.
Setup failedA step of the recipe an agent ran through pond failed. The worktree exists; the steps after it didn't run.
N changed filesUncommitted changes in the worktree.
N commits to pushClean, with commits the upstream doesn't have.
Ready for reviewClean, with no upstream to compare against.
N behindClean, and the upstream has commits this worktree doesn't.
Up to dateClean and level with its upstream.

Under the pill a card shows the repository name (or "api, main folder" for the main checkout), the branch, and a note that depends on the state:

  • Removing: "Removing the folder. The branch stays."
  • Folder missing: "The folder was deleted. Clean up to forget it."
  • Merged or gone: "Safe to remove, 412 MB". Disk use is measured with du two worktrees at a time, only for cards that are on screen.
  • The worktree open in this window: "Open in this window".
  • Marked by an agent, with a note: the note and how long ago it was set. See Coding agents.
  • Otherwise the last commit's summary, or "No commits yet".

Then the stats line: "N files changed" or "No changes", the ahead and behind counts, and "no upstream" when there isn't one.

Actions on a card

ButtonShown whenWhat it does
OpenThe worktree isn't open hereOpens it in this window.
View changesIt is the worktree open hereSwitches to the Changes tab.
PushIn Ready for review, open here, with an upstreamPushes the branch.
Open hereIn Ready for review, not open hereOpens it in this window.
TerminalNot merged or goneOpens the folder in Terminal.
Remove worktreeMerged or goneRemoves the folder. The branch stays.
FinderMerged or goneReveals the folder in Finder.
MoreAlwaysA menu: Open in this window, Open in a new window (⌘⏎), Open in Terminal, Reveal in Finder, and Remove worktree… Remove is disabled for the main folder and for the worktree open in this window. The same menu opens on right-click.

Double-clicking a row in the List layout opens that worktree.

Removing a worktree

Every removal asks first, and the question depends on what would be lost:

  • Clean and pushed: "Remove the name worktree?" Deletes the folder; the branch and its commits stay. Answer: Remove worktree.
  • Uncommitted changes: "name has uncommitted changes". Answers: Cancel, Remove and lose changes, or Commit first, which opens the worktree on its Changes tab.
  • Commits not on the remote: "name isn't on the remote". Answers: Cancel, Remove without pushing, or Push, then remove.

Removing several at once combines these: the dialog lists the worktrees with uncommitted changes and those not on the remote (the first four by name, then "and N more"), and offers Remove all and lose changes, Push, then remove, or Remove the safe ones.

Selecting several

Tick a card's checkbox, ⌘-click a card to add it, or ⇧-click to pick a run of cards. A bar then shows "N selected" with Select all N or Select none, Add merged or gone, Clear, and Remove N. esc clears the selection. The hint under the board reads "⌘-click or tick worktrees to remove several at once. ⇧-click picks a run."

The List layout

Columns: Worktree, Status, Changes, Ahead, behind, Last commit. Sort order follows the board's grouping.

When there are no worktrees

The board shows "Only the main folder so far." with a line explaining that a worktree checks out another branch in its own folder, so you (or an agent) can work on it without stashing or switching here, and a New worktree button.

Free and Pro

From Mergepond 1.0.7 the board is part of Pro. Worktrees themselves are free: you can create, open and remove them on Free.

On Free, the Worktrees tab lists every worktree with its branch and folder, an Open button (Show changes for the worktree open in this window) and a ⋯ menu. Under the list, "See every worktree's status with Pro" explains what the board adds, with Buy Pro and Enter licence key.

Pro adds:

  • the Board, Grid and List layouts;
  • the state pills and the columns they sort into;
  • the marks that show which worktrees a coding agent is working in, has ready for review or has finished;
  • selecting several worktrees to remove at once;
  • Clean up.

On Free:

ToUse
Create a worktreeNew worktree on the Worktrees tab, ⌘N, or "New worktree for this branch…" on a branch's right-click menu. The gear beside New worktree opens worktree settings. From a terminal, pond new <branch>.
Open oneOpen in the list, the worktree's row in the sidebar, or the command palette.
Remove one"Remove worktree…" in the ⋯ menu or on right-click, in the list or on a worktree row in the sidebar. It asks first, as described above. From a terminal, pond remove <branch>, which refuses uncommitted changes and unpushed commits unless you add --force.
See each worktree's statepond list in a terminal prints every worktree with its state and what an agent said about it. See Coding agents.