Follow Discord
Sweep 22 Oct 2026 · 21:04Z Build v2.1.309 528 read Stable v2.1.308 Latest v2.1.309 Next v2.1.309 Feeds RSS JSON llms.txt llms-full.txt Unofficial
HomeDocsSearch
Search the documentation

15 pages for --worktree.

Titles and paths first, then pages whose text carries it. Each row opens that page as this site last read it.

Claude Code changelog Claude Code CLI · in the page changelog …napshot` and `claude update` to match actual behavior * Fixed `claude --worktree` removing the worktree and its branch without asking at exit when HEAD was detached or on another branch, which could l… Explore the .claude directory Claude Code CLI · in the page claude-directory …rees', when: <>Read when Claude creates a git worktree via <C>--worktree</C>, the <C>EnterWorktree</C> tool, or subagent <C>isolation: worktree</C></>, description: <>Lists gitignored… CLI reference Claude Code CLI · in the page cli-reference …| Create a tmux session for the worktree. Requires `--worktree`. Uses iTerm2 native panes when available; pass `--tmux=classic` for traditional tmux… Common workflows Claude Code CLI · in the page common-workflows …ository needs at least one commit first. ```bash theme={null} claude --worktree feature-auth ``` Run the same command with a different name in a second terminal to start an isolated parallel session… Run Claude Code behind a corporate launcher Claude Code CLI · in the page corporate-launcher …with the `disableDeepLinkRegistration` setting. * The relaunch that `--worktree` combined with `--tmux` performs: the terminal multiplexer starts that pane, not Claude Code's binary. * The native-mes… Desktop application Claude Code CLI · in the page desktop …attachments | Not available | Images, PDFs | | Session isolation | [`--worktree`](/docs/en/cli-reference) flag | [Run a session in its own worktree](#run-a-session-in-its-own-worktree) | | Multiple s… Hooks reference Claude Code CLI · in the page hooks …to watch | | `WorktreeCreate` | When a worktree is being created via `--worktree`, `isolation: "worktree"`, or for a background session. Replaces default git behavior | | `WorktreeRemove` | When a wor… Automate actions with hooks Claude Code CLI · in the page hooks-guide …to watch | | `WorktreeCreate` | When a worktree is being created via `--worktree`, `isolation: "worktree"`, or for a background session. Replaces default git behavior | | `WorktreeRemove` | When a wor… Set up Claude Code in a monorepo or large codebase Claude Code CLI · in the page large-codebases …ur starting point. ### Check out only the directories you need The `--worktree` flag starts a session in a new git worktree so changes stay isolated from your main checkout. By default it checks out… Claude Code settings Claude Code CLI · in the page settings …| | ### Worktree settings Configure how `--worktree` creates and manages git worktrees. | Key | Description… Extend Claude with skills Claude Code CLI · in the page skills …a linked [git worktree](/docs/en/worktrees.md) that you created with `--worktree` or `git worktree add`, Claude Code searches parent directories only up to the worktree root. On Claude Code v2.1.277 o… Week 19 · May 4–8, 2026 Claude Code CLI · in the page whats-new/2026-w19 …New `worktree.baseRef` setting (`fresh` | `head`) controls whether `--worktree`, the `EnterWorktree` tool, and agent-isolation worktrees branch from the remote default branch or local `HEAD`; the de… Week 33 · August 10–14, 2026 Claude Code CLI · in the page whats-new/2026-w33 …subgroups. On v2.1.233 or later, pass a GitLab merge request URL to `--worktree` to branch from it, and the `claude agents` view labels sessions linked to a merge request as `!N`. Claude Code also re… What's new Claude Code CLI · in the page whats-new/index …erits the full conversation; **GitLab** merge request URLs work with `--worktree` and the `claude agents` view, and marketplaces clone bare `gitlab.com` URLs; and typing **`@`** in the prompt mentions… Run parallel sessions with worktrees Claude Code CLI · in the page worktrees …sions in separate git worktrees so changes don't collide. Covers the `--worktree` flag, subagent isolation, `.worktreeinclude`, cleanup, and non-git VCS hooks. A [git worktree](https://git-scm.com/do…
Feedback