Appearance
Text size
Typeface
Line spacing
Tips

Parallel work

One at a time. Tell it whether you knew, and the ones you did not stay in your pile.

1 / 7

claude --worktree name gives a session its own checkout on its own branch.

It creates .claude/worktrees/<name>/ on branch worktree-<name>. Add that folder to .gitignore.

claude --worktree fix-login
The whole topic7
  • claude --worktree name gives a session its own checkout on its own branch.

    It creates .claude/worktrees/<name>/ on branch worktree-<name>. Add that folder to .gitignore.

  • .worktreeinclude copies untracked files like .env into every new worktree.

    It uses gitignore syntax, so a fresh worktree is runnable immediately.

  • worktree.baseRef decides what a new worktree branches from.

    fresh (default) uses the remote default branch; head uses your local HEAD and carries unpushed work.

  • claude --worktree "#1234" branches from a PR head.

    Handy for reviewing or fixing someone else's pull request in isolation.

  • "Don't ask again" approvals made inside a worktree apply everywhere.

    They save to the main checkout's .claude/settings.local.json.

  • /batch splits a large change into 5 to 30 independent units run in parallel worktrees.

    It researches, plans, then fans out. Use it for mechanical changes across many files.

  • Git LFS installed with --local yields pointer files in a new worktree.

    Claude Code skips repository-defined filter drivers when creating one. Run git lfs pull.