Reference
Guides
One command or task per page, with the syntax, worked examples and the errors you will meet.
Git Worktrees
git worktree add: every form of the command, with examples
How git worktree add works: create a worktree on a new branch, an existing branch, a remote branch or a detached HEAD, the options that matter, and how to fix the errors it throws.
Updated
Git Worktrees
git worktree remove: delete a worktree, its branch and what's left behind
How to remove a git worktree: git worktree remove and its --force rules, deleting the branch afterwards, cleaning up a folder you deleted by hand with git worktree prune, and the errors each one throws.
Updated
Git Worktrees
Claude Code worktrees: run parallel sessions with --worktree
How Claude Code uses git worktrees: start an isolated session with claude --worktree, copy .env files in with .worktreeinclude, pick the base branch, give subagents their own worktree, and clean up or resume afterwards.
Updated
Git Worktrees
git worktree vs branch: what each one is, and when to use a worktree
A branch is a name for a line of commits; a worktree is a directory where a branch is checked out. How they differ, how they work together, and when to switch branches or add a worktree instead.
Updated