Skip to content
| Marketplace
Sign in
Visual Studio Code>SCM Providers>Worktree WindowsNew to Visual Studio Code? Get it now.
Worktree Windows

Worktree Windows

likeahuman

|
1 install
| (0) | Free
Open each VS Code window on its own git worktree — one window, one branch, isolated. Built for multi-window / multi-session workflows.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Worktree Windows

A VS Code extension that opens each window on its own git worktree — one window, one branch, one isolated working tree. Built for working on several branches at once across multiple windows (and, in our case, multiple Claude Code sessions per window) without them stepping on each other.

Why

A git repository has a single working tree and a single checked-out branch. Opening two VS Code windows on the same folder — or on two subfolders of the same monorepo — does not isolate them: they share one .git, one branch, one tree. A branch checkout, commit, or git stash in one window hits the other. Worktrees are git's only native mechanism for having several branches checked out at once, each in its own directory.

This extension makes spawning a worktree-backed window a single action, so every window you open is its own branch.

All terminals / sessions inside one window share that window's worktree. The isolation boundary is the window, not the terminal.

Commands

Command Default key What it does
Worktree: New Window… cmd+alt+n / ctrl+alt+n Pick new branch or existing branch, create the worktree, open it directly in a new window (no blank → reload flash).
Worktree: Remove… — Pick a worktree and remove it (git worktree remove, with a force fallback).

Settings (worktreeWindows.*)

baseRepoPath, worktreeRoot, defaultBaseBranch, branchPrefix, runInstall, installCommand, openInNewWindow, autoOnBlankWindow. Each has an in-editor description under Settings → Worktree Windows.

By default a new worktree triggers pnpm install in a terminal in the new window (output is visible there, and the create command never blocks on a long install). The worktree's folder name shows up in your Claude Code statusline, so you can always see which tree a window is on.

Build & install (local)

pnpm install
pnpm --filter worktree-windows run compile
pnpm --filter worktree-windows run package      # → worktree-windows.vsix
code --install-extension packages/worktree-windows/worktree-windows.vsix

Notes

  • A branch can be checked out in only one worktree at a time (git-enforced) — which is exactly why windows can't collide.
  • Worktrees share the repo's object store, so they're cheap on disk; each still needs its own node_modules (run once via runInstall).
  • The default worktreeRoot is a sibling <repo>.worktrees/ folder, kept outside the repo so file-watchers and tooling don't recurse into it.
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft