{"version":"2.1.336","anchor":"worktree-creation-b-b-branch-handling-and-host-fill-step","canonical_anchor":"worktree-creation-b-b-branch-handling-and-host-fill-step","heading":"Worktree creation handles existing branches and reports more failures","tier":"notice","area":"Worktrees","scope":"individual","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.336\/e\/worktree-creation-b-b-branch-handling-and-host-fill-step","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.336","markdown":"### Worktree creation handles existing branches and reports more failures\n\nCreating a worktree now chooses how to set up its branch, can run an extra step, and reports two new errors\n\n**Unclear.** What the extra setup step after creating the worktree does, and when it is available, is not shown.\n\n**What**\n\nA worktree is a separate working copy of a git repository, so Claude can work without touching your main folder. When Claude Code creates one:\n\n- It now picks between git's `-B` and `-b` options depending on whether the branch already points at the starting point.\n\n- It runs an extra setup step after `git worktree add` when one is available.\n\n- New error messages cover a branch that already exists, and a folder on the way to the worktree that was replaced while it was being made.\n\n**Why**\n\nThis changes how worktrees are created and gives clearer messages when creation fails.\n\n- Area: Worktrees\n- Tier: You'll notice\n- Useful: 2\/5\n- Signal: 1\/5\n- Scope: individual\n- Heads-up: no"}