Workspace WorktreesSwitch between tickets that span several Git repositories. Open the matching worktrees together in a new workspace window, with the remaining projects linked at their current paths. You can also switch an individual repository's worktree inside the current workspace. The extension adds native Tickets, Worktrees, and Branch Comparison views to the Source Control sidebar:
Click a ticket name to open its workspace. In the Worktrees view, hover over a worktree and click Switch Worktree to replace only that repository's workspace folder, preserving its display name and position. Selecting a worktree row alone does not switch anything. With one project open, Tickets shows expanded ticket groups containing that project. Click the project row to open its matching worktree as a folder in a new window. This works with File → Open Folder… and saved workspaces containing one project, without creating ticket workspace files.
If several worktrees match the same ticket, choose one in the picker; the choice is remembered. The new window uses the worktree's folder settings. Repository subfolders open at the corresponding subfolder in the target worktree. Branches without a ticket ID or configured prefix remain available in Worktrees. InstallRequires VS Code 1.96 or newer, Git 2.31 or newer, and a trusted workspace. Git must be available on the machine where the workspace lives.
You can also run:
You can also install Workspace Worktrees from the Visual Studio Marketplace. Set up your workspaceAdd each repository as its own folder with File → Add Folder to Workspace…, then use File → Save Workspace As…. A
Switching To replace a worktree inside the current window after opening a single directory, the extension offers Save Workspace As… first. Run the switch again after saving. Opening a project from Tickets works directly and always uses a new window. Untitled multi-folder workspaces also work; save them to keep your folder choices between sessions. Repositories nested under a parent workspace folder are listed when VS Code's Git extension detects them. They must be added as separate, non-overlapping workspace folders to switch independently. Remove the encompassing parent folder from the workspace after adding its individual repositories. Workspace folders that point to a repository subdirectory are supported if the same subdirectory exists in the target worktree. Switch ticketsFor tickets spanning multiple projects:
The original window and workspace file stay intact. These are references to existing folders: no projects are copied. Edits in an unmatched project are visible in every window that uses that same folder. Set If one repository has several worktrees for the same ticket, a picker lets you choose. That choice is remembered for this ticket and original workspace. To change it, right-click the ticket and choose Choose Worktrees for Ticket…. Missing worktrees and invalid selections produce an error before a workspace opens. Each original workspace has a separate catalog under the extension's global storage, in The Tickets view remembers the original repository catalog, so other tickets remain available even when their projects are omitted from the current window. Use Tickets: Return to Original Workspace to reopen the source in the current window. Add repositories or change prefix rules there, then open a ticket to update the catalog. The catalog belongs to that original workspace; moving or copying generated workspace files outside extension storage does not preserve this association. Ticket IDs are case-insensitive, start at a slash-separated branch segment, and have a project key followed by digits, such as
This also groups Compare with a branchHover over a ticket or one of its projects in Tickets:
The Branch Comparison view groups changed files by project and folder, with file counts and added/modified/deleted/renamed indicators. Click a file to open its side-by-side diff. Open All Changes in the view toolbar opens the full set in VS Code's multi-file diff editor. Change Comparison Branch… selects another baseline for the same projects; Refresh Comparison rebuilds the changed-file list after edits or Git operations.
Comparisons use the selected branch's current local commit against the ticket worktree's current files. This includes committed differences, staged and unstaged changes, non-ignored untracked files, and unsaved buffers for open existing text files. It is a direct branch-to-working-tree comparison; changes made on the base branch after the ticket diverged also appear. Remote-tracking references use the last fetched state; comparing does not fetch. The left side is an immutable, read-only Git revision. Normal working files on the right remain editable, and existing unsaved text is shown without saving it. Comparing leaves workspace folders, branch checkout, and the index unchanged. Binary contents are preserved, with rendering subject to VS Code's binary/image diff support; Git blobs larger than 16 MiB hit the extension's existing output limit and report an error. Symlinks show their link text, and submodules show commit/dirty-state summaries. If several worktrees match a project's ticket, comparison uses the matching worktree already open in the workspace, then the remembered ticket choice, or asks you to choose. A ticket-level comparison covers that ticket's matching projects; unmatched linked projects remain available in the workspace. Features
Editors and running processesOpening a ticket uses VS Code's workspace-opening behavior and separate editor sessions. In the default new-window mode, documents and processes in the original window stay there. Changing Before switching an individual worktree, affected unsaved documents require Save and Switch or cancellation. Saving writes to the original worktree. Changes are never copied into the selected worktree. By default, ordinary text tabs with matching files reopen in the selected worktree, in the same editor groups. Visible cursor positions and selections are restored. Tabs with no matching target file remain open at their original paths. Sticky tabs, diff editors, notebooks, and custom editors also stay associated with their original resources. Set Replacing the first workspace folder can restart VS Code's extension host. The switch is recorded before replacement so editor restoration can continue after that restart. VS Code keeps the window open, but language services and other extensions may reinitialize. Terminals, tasks, debug sessions, and running processes retain their original directories. Use Open Terminal on the selected worktree to start a terminal there. Folder-specific Settings
The extension follows the built-in Git extension's repository discovery. If Git is disabled, direct workspace folders can still be discovered using In Remote SSH, WSL, and Dev Containers, install the extension in the remote workspace. Git and all worktree paths must be available in that same remote environment. Browser-only and virtual workspaces are unsupported. DevelopmentUse Node.js 24 and npm. All development dependencies are pinned in
Press F5 to launch an Extension Development Host. Packaging writes Integration tests create disposable Git repositories and launch an isolated VS Code profile. They do not use your normal settings or extensions. On macOS they use the installed VS Code by default; elsewhere the test runner downloads stable VS Code. Set The ticket test generates workspaces, verifies unmatched-project links and settings preservation, then starts a second VS Code process in a generated workspace to check catalog restoration and selection of a ticket with different projects. Use CI runs unit/Git tests on Linux, macOS, and Windows, and extension-host tests on Linux against the minimum supported VS Code version and stable. The stable integration job packages and uploads a VSIX artifact. See architecture and maintenance notes for the switch lifecycle and validation boundaries. Troubleshooting
Worktree creation, removal, branch checkout, and automatic process migration are outside the extension's scope. LicenseMIT. |