{"version":"2.1.317","anchor":"git-root-detection-rejects-bare-or-odd-repo-layouts","canonical_anchor":"git-root-detection-rejects-bare-or-odd-repo-layouts","heading":"Git root detection rejects bare repositories and .git folder layouts","tier":"notice","area":"Elsewhere","scope":"individual","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.317\/e\/git-root-detection-rejects-bare-or-odd-repo-layouts","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.317","markdown":"### Git root detection rejects bare repositories and .git folder layouts\n\nClaude Code no longer treats a folder as a git project root when it sits in a bare repository or a gitdir layout, and says so\n\n**Unclear.** What Claude Code does with a folder placed in this separate category, instead of treating it as a root, is not stated.\n\n**What**\n\nClaude Code checks whether the folder it runs in is the top of a git project, meaning a folder tracked by the git version-control tool. Before, any folder with a `.git` file or folder counted as the root. Now there is an extra check.\n\n- A folder with a `.git` entry is classed as \"other\" rather than \"root\" when the check finds a bare repository (a git store with no working files) or a `gitdir:` file layout along the path.\n\n- A folder with no `.git` is classed as \"other\" rather than \"absent\" when a bare repository is found above it.\n\n- The `not_git_checkout` explanation now says the run may be inside a bare repository or a `.git` folder. Before, it said the `.git` was missing, could not be opened, or was not a plain file or folder.\n\n**Why**\n\nThis can change which folder Claude Code treats as your project root. If you work inside a bare repository or a `.git` folder, Claude Code now refuses to treat it as a normal checkout and tells you why.\n\n- Area: Elsewhere\n- Tier: You'll notice\n- Useful: 2\/5\n- Signal: 1\/5\n- Scope: individual\n- Heads-up: no"}