Your shell's git environment variables are scrubbed more thoroughly before Claude Code runs git.
What's wrong with this entry?
Before running git, Claude Code strips inherited git variables from the environment so your shell's settings cannot change what git does. The matching is now case-insensitive, covering the numbered GIT_CONFIG_KEY_n and GIT_CONFIG_VALUE_n pairs and the fixed list including GIT_DIR, GIT_WORK_TREE and GIT_ALTERNATE_OBJECT_DIRECTORIES.
- Any inherited variable whose name collides case-insensitively with one Claude Code sets itself is also unset, so a differently-spelled duplicate cannot survive.
GIT_ALTERNATE_OBJECT_DIRECTORIES
Strings lifted out of the shipped bundle, so the claim above can be checked against them.