Source Intelligence

DisclaimerUnofficial, and not affiliated with Anthropic. Nearly all of this is read straight out of what ships: npm bundles, captured prompts, published docs. Anthropic's own notes go in verbatim, marked as theirs. The rest is my reading, and every entry carries the strings behind it. If one looks wrong, vote it down and say why.

All of v2.1.48 Home All releases olderv2.1.47 v2.1.49newer
Claude Code v2.1.48

Git Worktree Mode

What

Create and work in isolated git worktrees directly from Claude Code, with full session management and cleanup prompts.

Usage
# Start Claude Code with a new worktree
claude --worktree
claude -w

# Start with a named worktree
claude --worktree=my-feature

# Combine with tmux for parallel sessions
claude --worktree --tmux
Details
  • Creates a new git worktree in .claude/worktrees/ with a dedicated branch based on HEAD
  • Automatically switches the session's working directory to the worktree
  • On session exit, prompts to keep or remove the worktree and associated tmux session
  • Symlinks configured directories (like node_modules) from main repo to avoid disk bloat
  • Copies settings.local.json and configures git hooks from the main repository
  • The worktree branch is automatically deleted when removing the worktree
Evidence

New -w, --worktree [name] flag and CreateWorktree tool (search for "Create a new git worktree for this session")

Strings lifted out of the shipped bundle, so the claim above can be checked against them.

See this entry in the whole of v2.1.48 →