{"version":"2.1.304","anchor":"worktree-creation-can-use-a-new-numbered-branch-with-b-inst","canonical_anchor":"worktree-creation-can-use-a-new-numbered-branch-with-b-inst","heading":"Creating a worktree no longer resets an existing branch with the same name","tier":"notice","area":"Worktrees","scope":"individual","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.304\/e\/worktree-creation-can-use-a-new-numbered-branch-with-b-inst","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.304","markdown":"### Creating a worktree no longer resets an existing branch with the same name\n\nWhen a worktree gets a new numbered branch name that already exists, Claude Code now stops with an error instead of resetting that branch\n\n**What**\n\nA git worktree is an extra working copy of your repository, on its own branch. When Claude Code creates one with a new branch, it now asks git to create the branch only if it does not exist. Before, it always reset the branch, even if one with that name was already there.\n\nIf a branch with the numbered name already exists, Claude Code now stops with an error saying so, leaves that branch as it is, and asks you to pass a different worktree name.\n\n**Why**\n\nAn existing branch can no longer be overwritten by accident when a worktree is given an automatically numbered name.\n\n- Area: Worktrees\n- Tier: You'll notice\n- Useful: 4\/5\n- Signal: 1\/5\n- Scope: individual\n- Heads-up: no"}