{"version":"2.1.310","anchor":"git-subprocess-env-scrubbing-now-also-strips-git-template-di","canonical_anchor":"git-subprocess-env-scrubbing-now-also-strips-git-template-di","heading":"Git commands no longer inherit GIT_TEMPLATE_DIR or ARGV0 in some cases","tier":"notice","area":"Git","scope":"individual","heads_up":true,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.310\/e\/git-subprocess-env-scrubbing-now-also-strips-git-template-di","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.310","markdown":"### Git commands no longer inherit GIT_TEMPLATE_DIR or ARGV0 in some cases\n\nClaude Code now also removes `GIT_TEMPLATE_DIR` and `ARGV0` from the environment it hands to git, under a specific condition\n\n**What**\n\nEnvironment variables are settings passed from your shell to the programs it starts. Before Claude Code runs git, it already removed several of them, including `GIT_CONFIG` variables, `GIT_ALLOW_PROTOCOL`, `CDPATH`, `HOME` and `XDG_CONFIG_HOME`. It now also removes `GIT_TEMPLATE_DIR` and `ARGV0` when a particular condition holds.\n\n**Why**\n\nThis is a hardening step. `GIT_TEMPLATE_DIR` points git at a folder of files to copy into new repositories, and removing it stops a value in the environment from slipping such files in.\n\n- Area: Git\n- Tier: You'll notice\n- Useful: 1\/5\n- Signal: 1\/5\n- Scope: individual\n- Heads-up: yes"}