Pimp My IDE / garage dispatch
Back to garage
October 1, 2026 | worktrees / dependencies / isolation

A faster worktree can still borrow the wrong state.

VS Code 1.140 can reuse ignored folders across worktrees by linking them back to the current checkout. That can cut setup time. It can also give two branches one mutable dependency tree.

Share downloads freely. Share installed dependencies only under a written compatibility rule. Keep build output branch-local.

The shortcut is real.

VS Code 1.140 adds the experimental git.worktreeSymlinkFolders setting. You give it gitignore-style patterns such as node_modules. When VS Code creates a worktree, it links matching ignored folders to the current checkout instead of installing or copying them again.[1]

This attacks a real cost. Parallel agent work often creates short-lived worktrees. Reinstalling a large dependency tree for every branch wastes time and disk. A link makes the second worktree ready sooner.

The folder is faster because it is the same folder.

Git isolation does not extend through your link.

Git worktrees let one repository check out more than one branch at once. Git keeps metadata that distinguishes each working tree. A symlink to an ignored directory is outside that branch separation. Both paths can reach the same bytes.[2]

The word "ignored" does not mean disposable or safe to share. Git defines ignored files as intentionally untracked files. Files already tracked by Git are not affected by ignore rules. The rule says what Git omits from status and commits. It says nothing about whether two running tools may mutate the same directory safely.[3]

Installed trees have writers.

A dependency directory records more than downloaded packages. Its shape can depend on the lockfile, runtime, operating system, architecture, package-manager version, install flags, optional dependencies, and lifecycle scripts. Two branches can disagree on any of those inputs.

npm documents one hard example. npm ci requires a lockfile, refuses a package and lock mismatch, and automatically removes an existing node_modules before installation. That clean-install behavior is useful. It also proves that an installed tree is a mutable target, not a passive cache.[4]

Share by artifact class.

A download cache is keyed storage. It is designed to serve many installs. An installed dependency tree is resolved output for one environment. Build output and test coverage belong to one revision and command. These folders may all appear in .gitignore, but they do not have the same ownership rules.

Start with the safest speedup. Share the package-manager download cache. If you share an installed tree, require matching lockfile bytes, runtime and platform, install flags, and one writer at a time. Keep dist, coverage, generated code, and branch-specific databases inside each worktree.

Interactive makeover / dependency bus

Choose the load, then close the interlocks

Traditional purpose replaced: a static list of ignored-folder globs. Better version: a load selector and four ordered interlocks produce a sharing policy without claiming that the setup was tested.

Set the artifact class

The selector changes the default recommendation. The interlocks record requirements for a proposed shared folder. They do not inspect either worktree.

Folder load
Sharing interlocks
4 requirements openDownload cache
Folder class / sharing requirements

Shared dependency bus

The folder class is selected. The lock requirement is open.

Record the exact lockfile hash or cache key before linking paths.

All four interlocks means the policy structure is ready. It does not mean the paths match, concurrent writes are safe, the link exists, or either branch passed its build.

One link / four checks

Do not use gitignore as an ownership model.

01 / INPUT

Lock identity

Hash the lockfile or use a documented cache key. A file name is not enough.

02 / HOST

Runtime identity

Pin runtime, platform, architecture, package manager, and native build tools.

03 / SHAPE

Install policy

Keep install flags, omitted groups, scripts, and linker strategy with the folder rule.

04 / WRITE

Writer ownership

Serialize clean installs and rebuilds. Name invalidation and rollback commands.

Sources read

Source log and evidence boundary
  1. Visual Studio Code 1.140 release notes, released September 30 and read October 1, 2026. The source describes the experimental git.worktreeSymlinkFolders setting and says VS Code links matching ignored folders from a new worktree to the current checkout.
  2. Git worktree documentation, read October 1, 2026. Git defines main and linked worktrees, the metadata that distinguishes them, and the ability to check out more than one branch from one repository.
  3. Git gitignore documentation, read October 1, 2026. Git defines ignore files as rules for intentionally untracked files and states that files already tracked by Git are not affected.
  4. npm CLI 11 documentation for npm ci, read October 1, 2026. npm documents lockfile requirements, frozen package metadata, whole-project installation, and removal of an existing node_modules before a clean install.

Evidence boundary: the folder classification and four-interlock policy are Pimp My IDE editorial guidance. We read the release notes and tool documentation. We did not run the experimental VS Code setting in a live editor session, and we did not test concurrent writes to a shared dependency tree.