Skip to content
BENIBIX Learn

CLAUDE_CODE_GIT_BASH_PATH

AI⌨️ Claude CodeConfiguration

Also known as CLAUDE_CODE_GIT_BASH_PATH=C:\Program Files\Git\bin\bash.exe

On Windows, it points Claude Code at your Git Bash.

Think of it like

It is like you give a taxi the full address. The map could not find it.

Example

Lucy installed Git in a custom folder, so Claude Code could not find bash. She sets this to the full path.

Why it matters

On Windows, Claude Code needs a bash to run its commands. A custom install can hide it.

Definition

CLAUDE_CODE_GIT_BASH_PATH tells Claude Code on Windows where Git Bash is. Use it when Git Bash is on the computer but not on your PATH. The file must be named bash.exe, sh.exe, bash or sh. If the path is wrong, Claude Code ignores it and looks for Git Bash itself.

Example code

powershell
$env:CLAUDE_CODE_GIT_BASH_PATH = "C:\Program Files\Git\bin\bash.exe"
claude
Point Claude Code at Git Bash in PowerShell.

Common mistake

Pointing it at git.exe. It must be the bash program itself.

Key takeaways

  1. 1
    Windows only. Git Bash.
  2. 2
    When not on PATH. Custom installs.
  3. 3
    Wrong path. Ignored.