{"version":"2.1.281","anchor":"isolated-git-env-drops-git-config-system-points-global-at","canonical_anchor":"windows-msys-style-paths-and-git-config-globalsystem-handle","heading":"Git config environment variables handled differently in internal git calls and path checks","tier":"notice","area":"Git","url":"https:\/\/changelogs.core-directive.com\/v\/2.1.281\/e\/isolated-git-env-drops-git-config-system-points-global-at","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.281","markdown":"### Git config environment variables handled differently in internal git calls and path checks\n\nClaude Code's internal git handling now reads GIT_CONFIG_GLOBAL and GIT_CONFIG_SYSTEM, sets global config to \/dev\/null, and converts Windows paths\n\n**Unclear.** The finding does not say what `GIT_CONFIG_GLOBAL` was set to before this change.\n\n**What**\n\n`GIT_CONFIG_GLOBAL` and `GIT_CONFIG_SYSTEM` are environment variables that tell git where to find its global and system-wide settings files. Claude Code changed how it treats them:\n\n- The isolated environment for Claude Code's own internal git calls is now `GIT_CONFIG_GLOBAL: \"\/dev\/null\"` and `GIT_CONFIG_NOSYSTEM: \"1\"`. It no longer sets `GIT_CONFIG_SYSTEM`. System config is still ignored through `GIT_CONFIG_NOSYSTEM`.\n\n- The check that reads git config to find hooks and filters to disable now copies `GIT_CONFIG_GLOBAL` and `GIT_CONFIG_SYSTEM` from the configured environment. Hooks and filters are scripts git runs automatically. The check also uses the git program from that same environment. Before, it relied only on asking git for `GIT_CONFIG_GLOBAL` with a default environment.\n\n- On Windows, a new helper converts MSYS-style paths such as `\/c\/...` to `C:\\...` and matches both forms. A list naming `GIT_CONFIG_GLOBAL` and `GIT_CONFIG_SYSTEM` is used alongside it in path checks.\n\n**Why**\n\nIf you point git at a different global or system config file, Claude Code now finds the hooks and filters defined there when disabling them for its own git calls. On Windows, paths written in both styles are recognised as the same place.\n\n- Area: Git\n- Tier: You'll notice\n- Useful: 1\/5\n- Signal: 1\/5"}