AI Review Ready
Home / Claude Code / Git for Windows or PowerShell
Fix · Claude Code · Windows

Claude Code: requires either Git for Windows or PowerShell

Git for Windows is optional: Claude Code falls back to PowerShell when Git Bash is missing. So this error means it found neither. Here is how to give it one.

Option 1: put PowerShell back on PATH

Its default folder is C:\Windows\System32\WindowsPowerShell\v1.0\. Add that folder to your PATH, or install PowerShell 7, which provides pwsh.

Option 2: install Git for Windows

Download it from git-scm.com/downloads/win and choose "Add to PATH" during setup. Restart your terminal afterwards. This also enables Claude Code's Bash tool.

Option 3: Git is installed but not found

Without CLAUDE_CODE_GIT_BASH_PATH, Claude Code looks for bash.exe in C:\Program Files\Git and C:\Program Files (x86)\Git, then via the git on your PATH. It skips a git inside the folder you launched from, or under a path containing node_modules, .venv or env. Find yours and point Claude Code at it:

where.exe git

Then in settings.json, using the bin\bash.exe of that install:

{
  "env": {
    "CLAUDE_CODE_GIT_BASH_PATH": "C:\\Program Files\\Git\\bin\\bash.exe"
  }
}

Set, but still ignored?

  • The file must be named bash.exe, sh.exe, bash or sh. Pointing at git-bash.exe (the launcher) is ignored, and so is a path that does not exist; run with --debug to see the warning.
  • If the name is right, endpoint security (AppLocker, Group Policy, EDR) may be blocking it. Ask IT to allowlist claude.exe and the processes it starts, including cmd.exe and bash.exe.

Other Claude Code install errors on Windows

Source: Anthropic's Claude Code docs, Advanced setup and Troubleshoot installation and login, read 28 Nov 2026. Claude Code updates often: if a step here no longer matches, the official docs win.