{"version":"2.1.242","anchor":"claude-checks-a-checkout-s-git-configuration-before-running-","canonical_anchor":"claude-checks-a-checkout-s-git-configuration-before-running-","heading":"Claude checks a checkout's git configuration before running git in it","tier":"notice","area":"Git Safety","scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.242\/e\/claude-checks-a-checkout-s-git-configuration-before-running-","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.242","markdown":"### Claude checks a checkout's git configuration before running git in it\n\nClaude inspects a synced checkout's git config first and refuses to run git there if it looks unsafe.\n\n**What**\n\nBefore running git in a synced directory, Claude Code now inspects that checkout's configuration and refuses when it looks unsafe, with a named reason. This blocks a repository from steering git commands run on your behalf.\n\n**Details**\n\n- Refusal reasons include a git executable inside the checkout, a config file inside the work tree that contributes to configuration, include chains that are too deep or too numerous, non-UTF-8 hook or filter names, reftable or borrowed object stores, and a `.git` file pointing back inside the work tree.\n- It first probes the git binary to confirm it honours configuration from the environment, which requires git 2.31 or newer.\n- When it does run git, hooks are pinned off by name, filter drivers are cleared, and `GIT_CONFIG` and `GIT_ATTR_SOURCE` are blanked from the environment.\n\n**Evidence**\n\n`[dirSync] refusing to run git in `\n\n- Area: Git Safety\n- Tier: You'll notice\n- Useful: 3\/5\n- Signal: 3\/5"}