{"version":"2.1.305","anchor":"worktree-base-resolution-uses-exact-ref-lookup-show-ref-fo","canonical_anchor":"worktree-base-resolution-uses-exact-ref-lookup-show-ref-fo","heading":"Worktrees based on origin's default branch use the exact remote branch","tier":"notice","area":"Elsewhere","scope":"individual","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.305\/e\/worktree-base-resolution-uses-exact-ref-lookup-show-ref-fo","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.305","markdown":"### Worktrees based on origin's default branch use the exact remote branch\n\nWhen creating a worktree from origin's default branch, Claude Code now looks up the exact remote branch and names the failing git command in errors\n\n**What**\n\nA worktree is a second working copy of your git repository in its own folder. When Claude Code creates one based on the default branch of `origin` (your main remote repository), it now looks up that branch with `git show-ref`, which matches only the exact remote branch name, instead of a looser lookup.\n\nOther changes in the same step:\n\n- The worktree is created from the commit that branch points to.\n\n- If a git command fails, the error now names the actual command that failed.\n\n- If fetching the latest copy of the branch fails, Claude Code still reads the copy of the remote branch it already has, instead of requiring the fetch to succeed first.\n\n**Why**\n\nWorktrees started from origin's default branch are more reliably tied to the right remote branch, and failures are easier to understand.\n\n- Area: Elsewhere\n- Tier: You'll notice\n- Useful: 2\/5\n- Signal: 1\/5\n- Scope: individual\n- Heads-up: no"}