{"version":"2.1.300","anchor":"worktree-base-is-now-pinned-to-a-resolved-commit-sha","canonical_anchor":"worktree-base-is-now-pinned-to-a-resolved-commit-sha","heading":"New worktrees start from a fixed commit, not a moving HEAD","tier":"notice","area":"Worktrees","scope":"individual","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.300\/e\/worktree-base-is-now-pinned-to-a-resolved-commit-sha","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.300","markdown":"### New worktrees start from a fixed commit, not a moving HEAD\n\nClaude Code now looks up the exact commit before creating a worktree from HEAD, so the starting point can't shift partway through\n\n**What**\n\nA worktree is a second working copy of a git repository in its own folder. HEAD is git's name for the commit you currently have checked out. When Claude Code bases a new worktree on HEAD, it now looks up the exact commit first and creates the worktree from that commit. This covers two cases:\n\n- The worktree is based on HEAD on purpose\n\n- Fetching the branch from the remote failed, so Claude Code falls back to your local HEAD\n\nBefore, Claude Code passed the name HEAD itself to git.\n\n**Why**\n\nIf HEAD moved while the worktree was being created, the worktree could end up on a different commit than intended. Pinning the commit first stops that. In everyday use you are unlikely to notice a difference.\n\n- Area: Worktrees\n- Tier: You'll notice\n- Useful: 2\/5\n- Signal: 1\/5\n- Scope: individual\n- Heads-up: no"}