Skip to content

Git worktrees

Git worktrees let you check out several branches at the same time, each in its own folder. VdevAI uses worktrees to run tasks in separate windows without one branch changing files underneath another task.

Open the worktrees view from VdevAI and choose Create worktree. Select the base branch and a branch name for the new checkout. Once created, open the worktree in its own VS Code window and start the task there.

The worktrees view lists existing checkouts with their branch and path. Switch to a worktree to open it, or remove it when the branch is merged. Removing a worktree does not delete the branch unless you explicitly choose that option.

A .worktreeinclude file at the repository root lists files or directories that should be copied into each new worktree. This is useful for local configuration and dependency folders that Git does not track.

node_modules/
.env.local

Keep secrets out of .worktreeinclude unless the destination is private. The file is read when the worktree is created; changing it does not update worktrees that already exist.

Worktrees require Git and a normal Git repository. Multi-root workspaces and repositories with unusual submodule layouts can have limitations; use a single repository root when possible.