Skip to content
| Marketplace
Sign in
Visual Studio Code>SCM Providers>TreeSwapNew to Visual Studio Code? Get it now.
TreeSwap

TreeSwap

kevin

| (0) | Free
Manage Git worktrees and run or stop each worktree's npm scripts from the Explorer.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

TreeSwap

Manage Git worktrees and their development servers without leaving VS Code. TreeSwap adds a collapsible Git Worktrees view near the bottom of the Explorer, where each worktree can have its own package.json and selected npm script.

Install

Install TreeSwap from the VS Code Marketplace, or install a .vsix package using Extensions: Install from VSIX.... You do not need to run npm install to use the extension.

Features

  • View the Git worktrees registered to the repository in your workspace.
  • Expand a worktree card to choose a package.json. By default, TreeSwap looks for <worktree>/package.json.
  • Select one of the package's scripts; the choice is saved separately for each worktree.
  • Start the selected script from the worktree card. It runs in a dedicated VS Code integrated terminal.
  • Press Stop while a script is running to send an interrupt. If it does not stop promptly, TreeSwap closes its terminal.
  • Check the status lamp on each card to see whether a script is running.
  • See how much memory a worktree's running scripts are using, updated every few seconds next to the status lamp.
  • Reveal a worktree in the Explorer while keeping your existing editors and workspace folders.

Requirements

  • Open a folder from the Git repository whose worktrees you want to manage.
  • Git must be installed and available on PATH.
  • Node.js and npm are needed only if you want to run npm scripts from package files.

Usage

  1. Open the repository folder in VS Code.
  2. Find Git Worktrees near the bottom of the Explorer sidebar.
  3. Expand a worktree card. Choose a package.json if it is not in the worktree root.
  4. Select a script from the list. The selection is remembered for that worktree.
  5. Use the button beside the worktree name to run the selected script. Press Stop to interrupt it.

Use Refresh Worktrees in the view title after adding or removing worktrees. Use the view's title actions to expand or collapse all cards.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft