Claude Desktop: Fix "Git Is Required for Local Sessions"
If Claude Desktop tells you that Git is required for local sessions, the fix is usually to install Git and make sure it is available on your system PATH. This guide walks through the diagnosis and the setup.
Updated 5 min read
Claude Desktop shows the message "Git is required for local sessions" when it cannot find a working Git installation on your machine. Local sessions let Claude read and interact with a local directory; Git is used to track changes and provide context about the repository. Without it, Claude Desktop cannot start the session.
The fix in most cases is to install Git and restart Claude Desktop. If Git is already installed, the fix is usually to make sure it is on the system PATH. Tools like fenbs can hold your task brief while you sort out the development environment, so the work context is ready when the session starts.
Why Git is required
When Claude Desktop opens a local session with a directory, it uses Git to understand the project: what files have changed, what branch you are on, and what recent commits say about the work. It also uses Git to stage changes it makes so you can review them before accepting. Without Git, it cannot do any of that.
This is different from the Claude.ai web interface or the API, which do not require Git. The requirement is specific to Claude Desktop's local session feature. See the Claude desktop app overview for how local sessions fit into the product.
Git does not have to be configured with a remote, a username, or an email for Claude Desktop to use it. A bare local repository is enough. The local session uses Git as a change-tracking layer, not as a collaboration or backup tool.
Step 1: Check whether Git is installed
Open a terminal or command prompt and run:
git --version
If you see a version number (for example, git version 2.46.0), Git is installed. If you see an error like "command not found" or "'git' is not recognized", Git is not installed or not on your PATH.
Step 2: Install Git if it is missing
On macOS, the easiest route is to install the Xcode Command Line Tools, which include Git:
xcode-select --install
Alternatively, install Git directly from git-scm.com, which provides installers for macOS, Windows, and Linux. The site is the primary source for Git downloads.
On Windows, the Git for Windows installer from git-scm.com adds Git to your PATH automatically. On Linux, use your distribution's package manager: sudo apt install git on Ubuntu or Debian, sudo dnf install git on Fedora.
Step 3: Verify PATH after installation
After installing, open a new terminal window and run git --version again. A new terminal is important because the old one may not have loaded the updated PATH. If the version appears, close Claude Desktop completely and reopen it.
On Windows, if Git installed but git --version still fails in a new terminal, check that the Git bin directory was added to the system PATH. Open System Properties > Environment Variables, find the Path variable, and confirm it includes a path like C:\Program Files\Git\cmd.
Step 3b: Check the Git binary path on macOS
On macOS, Git installed via Homebrew goes to /usr/local/bin/git or /opt/homebrew/bin/git depending on whether you are on an Intel or Apple Silicon Mac. If a terminal finds Git but Claude Desktop does not, check whether Claude Desktop's PATH includes the Homebrew prefix. Running which git in a terminal tells you the path to the Git binary your shell uses.
Step 4: Confirm the directory is a git repository
Even with Git installed, Claude Desktop may require the local directory you are opening to be a git repository. Check whether the directory has been initialized:
cd /path/to/your/project git status
If git status returns "not a git repository", initialize one:
git init
You do not need remote hosting. A local git repository is enough for Claude Desktop's local session feature.
Keep your task notes ready while you fix the environment
Add the project to fenbs before spending time on environment setup. Write the task and where things stand as the current context. When Claude Desktop is working again and you connect it to fenbs over MCP, it reads the project context and picks up from Where we left off.
Create a free accountFree for one person · No credit card · Works with Claude, ChatGPT, Cursor and more
If the error persists after installing Git
If you have confirmed that git --version works in a terminal but Claude Desktop still shows the error, try these steps:
- Quit Claude Desktop fully, not just close the window. On macOS, right-click the dock icon and choose Quit.
- Reopen Claude Desktop after quitting completely.
- Check the Claude Desktop logs for more detail about what it tried and why it failed.
- If Claude Desktop was open when you installed Git, it may have cached the old PATH. A full restart of the app, or in some cases the machine, picks up the new PATH.
For MCP configuration issues unrelated to Git, see claude desktop MCP not working and claude desktop MCP config. For a comparison of Claude Desktop with CLI and VS Code options, see claude code desktop vs CLI vs VS Code.
How to do this with fenbs
- Create a free account and add a task for the work you planned to do in the local session.
- Write where things stand and what the next step is, so the context is not lost while you fix the environment.
- Once Git is working and Claude Desktop opens the local session, connect Claude Desktop to fenbs from Integrations.
- Ask Claude Desktop to read the project context before it starts. It reads the task and the rules before making any changes.
- After each session, save progress so the next session starts from the right place.