# CLAUDE_CODE_GIT_BASH_PATH

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

**Field:** Artificial Intelligence  
**Category:** Claude Code  
**Also known as:** CLAUDE_CODE_GIT_BASH_PATH=C:\Program Files\Git\bin\bash.exe

## Think of it like

It is like you give a taxi the full address. The map could not find 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

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

## 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.

## Why it matters

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

## Common mistake

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

## Three principles

- **Windows only.** Git Bash.
- **When not on PATH.** Custom installs.
- **Wrong path.** Ignored.

## Related terms

- [CLAUDE_CODE_SHELL](https://learn.benibix.com/term/ai/claude-code-shell-variable)
- [Bash Tool](https://learn.benibix.com/term/ai/bash-tool)
- [PowerShell Tool](https://learn.benibix.com/term/ai/powershell-tool)

---

Source: https://learn.benibix.com/term/ai/claude-code-git-bash-path-variable
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-16
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
