{"version":"2.1.333","anchor":"git-bare-repository-protection-via-git-config-env-behind-bo","canonical_anchor":"git-bare-repository-protection-via-git-config-env-behind-bo","heading":"Git commands can be told to refuse bare repositories unless named explicitly","tier":"notice","area":"Git","scope":"both","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.333\/e\/git-bare-repository-protection-via-git-config-env-behind-bo","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.333","markdown":"### Git commands can be told to refuse bare repositories unless named explicitly\n\nClaude Code can now pass git a setting that only allows bare repositories when they are named explicitly, behind server-side flags\n\n**Unclear.** It is not clear when this protection is in effect, since it sits behind server-side flags.\n\n**What**\n\nA bare repository is a git repository with no normal project files, only git's own data. Claude Code can now pass git the setting `safe.bareRepository=explicit` through environment variables when it runs git. One path that does this is controlled by a server-side flag, a switch Anthropic controls remotely. A second server-side flag chooses between two versions of related code.\n\n**Why**\n\nThis hardens the git commands Claude Code runs against a booby-trapped bare repository placed inside a project.\n\n- Area: Git\n- Names: `safe.bareRepository=explicit`\n- Tier: You'll notice\n- Useful: 3\/5\n- Signal: 3\/5\n- Scope: both\n- Heads-up: no"}