Skip to main content

Git Worktree Answers

Fixes and explanations for common git worktree errors and setup questions.

A git worktree is a second working directory attached to the same repository. Worktrees are how most tools isolate parallel coding agents, so their errors show up often. Each answer below covers one error or question.

Start with the "branch is already used by worktree" fix if Git refuses a checkout. For a first setup, read where to put worktrees. For problems that only show up with several agents, see the coding agents and Git answers.