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
Configure default directory/pattern for git worktrees #293884
When using Git worktrees, it's quite common to not want them inside the .git directory for several reasons. However, Git doesn't offer any configurability.
It would be nice if VS Code (especially with the new Agents Window) would offer a setting for the directory/pattern of work directories.
Common structure
~/projects/org-1/my-repo/ main repo ~/projects/org-1/other-repo/ main repo
~/worktrees/org-1/my-repo/feat1/ worktree for branch feat1 ~/worktrees/org-1/my-repo/feat2/ worktree for branch feat2
Example from Github Copilot app
Example from Worktrunk CLI
Here is an example of how the popular worktrunk CLI does it (this level of configurability would be great):
Reacted by sandstrom, Curtis Man, FredFraiche, Johan Suleiko Allansson, prinzt, Bruno Flávio, Sune Justesen, Dion Leurink, Fabian Meyertöns, adriancuadrado and 2 more
Thanks for the suggestion. I checked the current Insiders (1.148.0, Linux): there's no setting for the worktree location or a path pattern. Searching Settings for "worktree" shows only settings for worktree detection, files to copy into new worktrees, and folders to symlink.
Activity
[-]Configure default directory for git worktrees[/-][+]Configure default directory/pattern for git worktrees[/+]devcontainer: add agent variant with host-mirrored worktree paths (mi…
sandstrom commentedon Aug 27, 2026
Short update. Github Copilot app now has this configurable in settings. Added a photo example above.
Would be neat if VS Code also made it customizable in the same way, with variables.
lszomoru commentedon Nov 24, 2026
Thanks for the suggestion. I checked the current Insiders (1.148.0, Linux): there's no setting for the worktree location or a path pattern. Searching Settings for "worktree" shows only settings for worktree detection, files to copy into new worktrees, and folders to symlink.
What exists today:
<repo>.worktreesfolder next to the repository. Copilot CLI agent panel: git worktree creation path defaults to inside workspace folder, causing silent duplicate loading in plugin-scan runtimes #316250 is about that default too.I'm keeping this open as a feature request for a configurable worktree base folder or path template.
🤖 Authored with GitHub Copilot on behalf of Ladislau Szomoru (@lszomoru).