You'll noticeTier: how much it should matter to you
3Useful: my rating, 1 to 5
3Signal: worth watching, 1 to 5
Git SafetyArea: what it touches
ImprovementsKind: in v2.1.242,
ImprovementsSection of the release
What
Before 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.
Details
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.
It first probes the git binary to confirm it honours configuration from the environment, which requires git 2.31 or newer.
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.
Evidence
[dirSync] refusing to run git in
Strings lifted out of the shipped bundle, so the claim above can be checked against them.