Last reviewed
Correct answer: A. A separate working directory with its own files and branch, sharing the repository's history and remote, and it needs a git repository
Explanation
The principle — a worktree separates the files you work in and leaves the history in one place.
Why the key is correct — Anthropic's definition names both halves: a git worktree is a separate working directory with its own files and branch, sharing the same repository history and remote as your main checkout. The glossary adds what that buys — parallel agents don't overwrite each other's files. And the requirement is flat: worktrees require a git repository.
Why the others are wrong — a full copy would duplicate a history and remote that are shared. A shared view of the files would remove the isolation that is the point. And a folder outside version control has nothing to check out twice.
Remember this — separate directory, separate branch, one shared history, inside a repository.
Sources — Anthropic's documentation on parallel sessions with worktrees, and the glossary.
Sources
“A git worktree is a separate working directory with its own files and branch, sharing the same repository history and remote as your main checkout.”
“Changes stay on a separate branch in a separate directory, so parallel agents don't overwrite each other's files.”
“Worktrees require a git repository”
Practise 10 questions on this topic
Take Claude Code Workflows — Timed Test 1 (10 questions) — scored instantly, explanation for every question, no login.