# Git worktree

**Git worktree**: An extra working copy of the same repository, in its own folder and on its own branch. It lets several Claude sessions work in parallel without getting in each other’s way.

Also called: worktree, worktrees, git worktree.

## Not the same as a branch

A branch is a line of history, and switching branches swaps the files in your one folder. A worktree is a second folder with its own branch checked out, sharing the same history, so two sessions can edit at once without touching each other’s files.

## Where it bites

A worktree is a fresh checkout: gitignored files such as .env are not in it and dependencies are not installed. List the files to copy in a .worktreeinclude file and run your setup in the new folder, or the agent’s first test run fails for reasons that have nothing to do with its change.

## In practice

claude --worktree feature-auth starts a session in .claude/worktrees/feature-auth, on a new branch named worktree-feature-auth.

Checked: 2026-10-22

## Covered in these lessons

- [/goal, /loop and Agent view: work that runs without you](https://zero2vibecode.com/learn/claude-code-pro/3-4-goal-loop-agent-view)
- [Parallel sessions in worktrees](https://zero2vibecode.com/learn/claude-code-pro/4-1-worktree-sessions)
- [A shared kit for the team](https://zero2vibecode.com/learn/claude-code-pro/5-3-team-marketplace)

Source: https://zero2vibecode.com/glossary/worktree
