<- back to runpane.com

glossary

what is a git worktree?

A git worktree is a separate copy of your repository on its own branch. It shares the same git history as your main repo but has its own files in its own folder. You can have as many as you want open at once.

the problem worktrees solve

Normally, your repo is one folder with one branch checked out. If you want to work on two features at the same time, you'd have to stash your changes, switch branches, do the other work, switch back, and unstash. It's annoying.

With worktrees, you get a second folder that's already on a different branch. Work on Feature A in one folder, Feature B in another. No stashing, no switching. Both exist at the same time.

why this matters for ai agents

If you run two AI agents in the same folder, they'll overwrite each other's changes. Agent A edits auth.ts. Agent B also edits auth.ts. Whoever saves last wins. The other agent's work is gone.

Worktrees fix this. Each agent gets its own folder, its own branch, its own copy of the files. They can both edit auth.ts at the same time without stepping on each other. When they're done, you merge each branch separately.

what it looks like on disk

my-project/              ← your main repo (main branch)
../my-project-feature-a/ ← worktree (feature-a branch)
../my-project-feature-b/ ← worktree (feature-b branch)

All three folders share the same git history. Changes committed in one worktree are visible in the others once merged. But uncommitted file edits are completely isolated.

how pane automates this

You don't need to run git commands yourself. When you create a new pane in Pane:

  1. Pane creates the worktree and branch for you.
  2. It copies over your env vars, node_modules, and other important directories so your agent can start working immediately.
  3. When you archive the pane, Pane cleans up the worktree automatically.

the manual way (for reference)

If you wanted to do this without Pane:

git worktree add ../feature-a feature-a
cd ../feature-a
claude   # start your agent here

# when done:
git worktree remove ../feature-a

Pane does all of this for you with one click.

related docs

- Panes & Worktrees — how Pane manages worktrees

- Running Agents in Parallel — the full parallel workflow

- Monorepos — worktrees in monorepo setups

- Git Worktrees for AI Agents — the landing page overview

Parsa Khazaeepoul

by Parsa Khazaeepoul

Last updated June 24, 2026

frequently asked questions

or
Download*
Windows SmartScreen warningDirect downloads can show a SmartScreen warning while Pane is unsigned. Pane is fully open source, so you can audit the code and build from source yourself.1. Click More info2. Click Run anyway3. Continue the installerThe PowerShell install downloads the official release directly and avoids most browser download friction.npm global install
Paste that in PowerShell.MacLinux