Fix Claude Code Windows Requires Git Bash
The Error
When running Claude Code on Windows, you see:
Claude Code on Windows requires git-bash
Quick Fix
Install Git for Windows from git-scm.com/downloads/win. During installation, select “Add to PATH.” Restart your terminal.
If Git is already installed, set the path in your settings:
{
"env": {
"CLAUDE_CODE_GIT_BASH_PATH": "C:\\Program Files\\Git\\bin\\bash.exe"
}
}
What’s Happening
Claude Code on native Windows requires Git for Windows, which includes Git Bash. Claude Code uses Git Bash as its shell environment for executing commands because it provides a Unix-like shell experience with standard utilities (grep, find, sed, etc.) that Claude’s tools expect.
Without Git Bash available in the system PATH, Claude Code cannot execute shell commands and displays this error at startup.
Step-by-Step Fix
Step 1: Check if Git is installed
Open PowerShell and run:
where.exe git
If this returns a path, Git is installed but Claude Code may not be finding Git Bash.
Step 2: Install Git for Windows
If Git is not installed, download it from git-scm.com/downloads/win.
During installation:
- Select “Add to PATH” when prompted
- Keep the default installation directory (
C:\Program Files\Git) - Complete the installation
Restart your terminal after installing.
Step 3: Set Git Bash path manually
If Git is installed but Claude Code still cannot find it, explicitly set the path. Find where Git Bash is located:
where.exe git
This might return something like C:\Program Files\Git\cmd\git.exe. The bash executable is at C:\Program Files\Git\bin\bash.exe.
Add this to your settings at %USERPROFILE%\.claude\settings.json:
{
"env": {
"CLAUDE_CODE_GIT_BASH_PATH": "C:\\Program Files\\Git\\bin\\bash.exe"
}
}
If your Git is installed somewhere else, adjust the path accordingly.
Step 4: Verify the fix
Open a new terminal and run:
claude --version
Claude Code should start without the Git Bash error.
Step 5: Fix 32-bit PowerShell confusion
If you also see “Claude Code does not support 32-bit Windows,” verify you are using the correct PowerShell:
[Environment]::Is64BitOperatingSystem
If this returns True, you are on a 64-bit system but opened the 32-bit PowerShell (labeled “Windows PowerShell (x86)” in the Start menu). Close it and open “Windows PowerShell” without the x86 suffix.
Step 6: Handle Claude Desktop conflict
If running claude opens Claude Desktop instead of Claude Code CLI, an older version of Claude Desktop registered a Claude.exe in the WindowsApps directory that takes PATH priority.
Update Claude Desktop to the latest version, which resolves this conflict.
Prevention
When setting up Claude Code on Windows for a team, include Git for Windows in your standard development environment. Add the CLAUDE_CODE_GIT_BASH_PATH setting to your managed settings if Git is installed in a non-standard location.
For Windows users who prefer to avoid Git Bash, consider using WSL (Windows Subsystem for Linux) where Claude Code runs in a full Linux environment without this requirement.
Level Up Your Claude Code Workflow
The developers who get the most out of Claude Code aren’t just fixing errors — they’re running multi-agent pipelines, using battle-tested CLAUDE.md templates, and shipping with production-grade operating principles.
Get Claude Code Mastery — included in Zovo Lifetime →
16 CLAUDE.md templates · 80+ prompts · orchestration configs · workflow playbooks. $99 once, free forever.