{"version":"2.1.299","anchor":"worktree-creation-refuses-bare-repository-layouts-with-a-cle","canonical_anchor":"worktree-creation-refuses-bare-repository-layouts-with-a-cle","heading":"Worktrees from a bare repository layout now fail early with a clear message","tier":"notice","area":"Worktrees","scope":"individual","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.299\/e\/worktree-creation-refuses-bare-repository-layouts-with-a-cle","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.299","markdown":"### Worktrees from a bare repository layout now fail early with a clear message\n\nCreating a worktree from a folder whose .git points to a bare repository now stops at once and tells you where to start Claude Code instead\n\n**What**\n\nA worktree is an extra working copy of a git repository that Claude Code can create so it can work separately from your main checkout, for example with `--worktree`. If you start that from a folder whose `.git` points to a bare repository (one with no working files of its own), Claude Code now stops straight away. It explains that it cannot create a worktree from this folder and tells you to start Claude Code in one of that repository's worktrees. Before, the attempt failed later with an error from git.\n\n**Why**\n\nIf you keep repositories in a bare layout, you now get a message that says what to do instead of a git error.\n\n- Area: Worktrees\n- Names: `--worktree`\n- Tier: You'll notice\n- Useful: 2\/5\n- Signal: 1\/5\n- Scope: individual\n- Heads-up: no"}