Guide contents

Worktrees

Git worktrees let you check out several branches of one repository into separate directories at the same time — one task, one branch, one working tree. Strand provides a dedicated Worktrees pane (Mod+6) for creating, inspecting, opening, and reviewing parallel checkouts.

The Worktrees pane#

Open it with Mod+6, the palette entry "Show: Worktrees", or by clicking a worktree in the sidebar's Worktrees section. The header shows repository / Worktrees, Clean up…, and New worktree.

Each checkout has a two-line row, ordered current first, then the main checkout, then the rest alphabetically. A row tells you:

Click a row to select it. The action bar offers Open worktree (disabled for the current checkout, which is already open) and, for linked checkouts, Review vs base. Double-click or press Enter to open it directly. Selection has its own highlight, separate from the current-checkout label. The selected path also appears in the status bar. Missing directories cannot be opened; repair or prune them through the sidebar.

Rows fill in progressively, starting with the current checkout. Line-count and last-activity estimates may be reused for up to 30 seconds when you reopen the pane. Cleanup checks the checkout's current status and merge state again before removing it.

Key Action
/ Select the previous / next worktree
Home / End Select the first / last worktree
Enter Open the selected worktree
Tab Move to the selected worktree's action buttons

Creating a worktree#

Click New worktree on the dashboard, use the + on the sidebar's Worktrees section, or run "New worktree…" from the palette. You can also start from a specific point: New worktree from here… appears in the sidebar branch menus and the commit graph's right-click menu, seeding the dialog with that branch or commit.

The dialog:

Reviewing a worktree against its base#

Review vs base in the pane action bar, sidebar, and tab context menus answers "what did this attempt actually change?" in one motion: Strand detects the worktree's base branch, pins the review baseline at the fork point (the merge-base of the worktree branch and the base), opens the worktree's tab, and lands you in the Review view in session mode.

That means you see everything since the branch forked — the agent's commits, whatever it staged, and whatever is still uncommitted — as whole-file diffs in a single queue, regardless of how the agent left the working tree. The full review toolkit applies: reviewed marks, notes, and feedback export. See Reviewing agent changes.

If several agent worktrees belong to repositories in one workspace, Workspace Review (Mod+7) aggregates them: every open worktree tab of a member repository reviews as its own section.

Merge & clean up#

Merge & clean up… in the sidebar and tab context menus lands the worktree's branch on its base and retires the worktree in one dialog:

The dialog warns when the worktree still has uncommitted changes, and when its files overlap with another dirty worktree's uncommitted changes — merge order matters in that case.

For bulk retirement, Clean up… in the header or the palette action Clean up merged worktrees… removes eligible worktrees that are both clean and already merged. The confirmation lists the checkouts and branches to remove. Current, main, locked, and missing checkouts are excluded. Prune stale worktrees clears registry entries whose directories have vanished.

Removal snapshots#

Before removing an existing worktree — including force removal and bulk clean-up — Strand must successfully archive HEAD, staged changes, unstaged changes, and non-ignored untracked files. The snapshot preserves the index separately, including content that exists only in staging. Restoring a new snapshot restores both staged and unstaged state; older snapshots remain readable with their original restore behavior.

If the archive fails, the worktree stays in place and Strand reports the error. Already-missing directories can still be pruned. Ignored files are excluded, and the snapshot does not stop external processes from writing afterward: stop an active agent before removing its worktree and preserve any ignored setup files you need.

Snapshots are retained behind the scenes and auto-pruned — the newest 10 per worktree are kept, with a 60-day cap — so the archive doesn't grow forever. They are intentionally not shown in the compact Worktrees pane.

Worktrees in the sidebar and tabs#

Shortcut summary#

Shortcut Action
Mod+6 Go to Worktrees
/ Move focus in the dashboard list
Enter Open the focused worktree
Mod+7 Workspace Review (includes open worktree tabs)

Mod+6 and Mod+7 are rebindable in Settings → Keyboard; the full shortcut reference lives in Keyboard and palette.