You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Feature]: Project-level config for symlinking large shared directories into worktrees #10451
#9791 added project-level .worktreeinclude, which copies listed gitignored paths into each new worktree. Copy is the right semantic for .env, .vscode/, and secrets: each worktree must own its file, and edits must not leak back to the primary checkout.
Copy is the wrong semantic for large, rebuildable, identical-across-worktrees directories — node_modules, .cache, build caches. There:
Duplicating hundreds of MB per worktree is slow and disk-hungry. On macOS/APFS this is cheap (clone-on-write), but on Linux and Windows it is a full byte-for-byte copy.
One install should ideally serve every worktree; per-worktree copies drift.
Orca already has the symlink machinery (repo.symlinkPaths / Worktree Shared Paths, createWorktreeLinkedPaths). The gap is the same one #7549 closed for copies: that list is per-user Orca config, so it is not version-controlled, not shared with teammates, and not portable across machines.
Proposed solution
A project-level, version-controlled way to declare directories that should be symlinked (shared) rather than copied into new worktrees — the counterpart to .worktreeinclude.
Open design questions:
Where the config lives — an .orca/ config file, orca.yaml, or a distinct include file. Worth checking what neighbouring tools already read so a repo can drop one file and have it work in several.
Merge behaviour with the existing per-user symlinkPaths (.worktreeinclude merges with, never replaces).
Collision rule when a path appears in both the copy list and the symlink list. Today the symlink pass runs first and the copy pass skips any path that already exists, so symlink wins — that precedence should be made explicit rather than incidental.
Safety — symlinking means worktree edits do reach the shared target. That is intended for node_modules, but the docs should be explicit, and the same traversal/.git guards as the copy path must apply.
Activity
feat(worktrees): support project-level worktree.sharedDirectories in …
fix(worktree): use local base when remote tracking ref is unavailable (…
feat(worktrees): support project-level worktree.sharedDirectories in …
fix(worktree): use local base when remote tracking ref is unavailable (…