{"version":"2.1.242","anchor":"git-commands-now-ignore-repository-supplied-replace-refs-and","canonical_anchor":"git-commands-now-ignore-repository-supplied-replace-refs-and","heading":"Git commands now ignore repository-supplied replace refs and grafts","tier":"notice","area":"Git Safety","scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.242\/e\/git-commands-now-ignore-repository-supplied-replace-refs-and","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.242","markdown":"### Git commands now ignore repository-supplied replace refs and grafts\n\nA repository can no longer use replace refs or grafts to change what history Claude Code sees.\n\n**What**\n\nEvery git subprocess Claude Code runs is now given `GIT_NO_REPLACE_OBJECTS=1` and `GIT_GRAFT_FILE=\/dev\/null`, so a repository cannot use replace refs or a graft file to change what history Claude Code sees. This sits alongside the existing scrubbing of hook environment variables.\n\n**Details**\n\n- Applied unconditionally on the git environment path, with no opt-out.\n- The shallow-repository probe gained a matching hardened path.\n\n**Evidence**\n\n`GIT_NO_REPLACE_OBJECTS`\n\n- Area: Git Safety\n- Tier: You'll notice\n- Useful: 3\/5\n- Signal: 3\/5"}