Skip to content

Worktrees and compare

Use multiple working trees from the same repo and diff one against another.

Available on
  • Desktop
  • Web Portal

A git worktree lets one repository have several working directories checked out at the same time, each on its own branch. Glueprint treats worktrees as a first-class concept so you can keep an in-progress feature in one tree, a hotfix in another, and a clean main in a third — all on disk at once.

The worktree list

The portal sidebar lists every worktree for the active repo. Each row shows:

  • The worktree’s branch name.
  • Sync state: up to date, ↑N ahead, ↓N behind, or both.
  • A not published badge if the branch has no upstream.
  • Per-worktree +N -N change counts.

On desktop, the active worktree fills the header. Sibling worktrees are reachable through Actions > Compare.

Add a new worktree

Click New worktree in the header. The sheet asks for:

  • A branch — pick an existing branch, or type a new name to create one.
  • A target path on disk for the new working directory.
  • Optionally, a detached HEAD flag if you want to check out a commit without a branch.

Glueprint runs git worktree add and registers the new tree in the sidebar.

Switch between worktrees

Click any worktree in the sidebar (or pick one from the Compare menu on desktop). The Worktree view re-points at the selected tree — changes, history, branches, stashes all reflect that tree.

Sessions tied to a working directory follow the directory, not the worktree concept — if you start a session in ~/code/myapp/feature-x, that session always operates on that path.

Remove a worktree

Open Actions > Remove worktree. Glueprint runs git worktree remove; if there are uncommitted changes you’ll see a confirm dialog so you don’t lose work.

Compare two worktrees side by side

Open Actions > Compare and pick the worktree you want to diff against the active one. Glueprint opens a side-by-side overlay showing differences between the two trees — working-tree state on each side, file by file. Useful for:

  • Spotting drift between a feature branch and main without committing.
  • Reviewing what one agent did in worktree A versus another in worktree B.
  • Confirming a cherry-picked change matches its original.

Why worktrees with Glueprint

Each agent session gets a stable working directory and a stable branch. Worktrees let you spin up a fresh isolated tree per agent — they can’t step on each other’s working state, and you can swap which one you’re focused on without git stash dances.