claude-code - 💡(How to fix) Fix Git is required error despite Git being installed and PATH set correctly

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Error Message

When clicking “New Session” in the Claude Code tab, the error “Git is required for local sessions” appears and no session can be started.

Error Messages/Logs

  1. Error appears: “Git is required for local sessions”

Code Example

Install git hub
RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • I am using the latest version of Claude Code

What's Wrong?

When clicking “New Session” in the Claude Code tab, the error “Git is required for local sessions” appears and no session can be started.

What Should Happen?

Claude Code should detect Git and allow a local session to start. What I’ve tried • Confirmed git --version returns 2.54.0 in Git Bash • Set CLAUDE_CODE_GIT_BASH_PATH in System Variables (not User Variables) • Ensured no spaces in the path • Fully closed and reopened Claude multiple times

Error Messages/Logs

Install git hub

Steps to Reproduce

  1. Install Git for Windows 2.54.0 2. Set CLAUDE_CODE_GIT_BASH_PATH system environment variable 3. Fully restart Claude 4. Click the Code tab and press New Session 5. Error appears: “Git is required for local sessions”

Claude Model

Sonnet (default)

Is this a regression?

No, this never worked

Last Working Version

No response

Claude Code Version

I can’t even get on Claude code to run this

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

Other

Additional Information

<img width="4284" height="5712" alt="Image" src="https://github.com/user-attachments/assets/ff3a836e-4a6f-40e6-91fa-2179e2676e01" />

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING