Cursor 3.6.6 on Windows does not detect newly initialized Git repositories in new/empty projects

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

Since the latest Cursor update, the Source Control / repo viewer in Cursor 3 fails to detect Git repositories in new projects on Windows.

This affects newly created folders and newly initialized repositories. Existing Git repositories appear to work normally.

The issue occurs whether the repository is initialized from Cursor’s Source Control panel or initialized externally using Git before opening the folder in Cursor.

Steps to Reproduce

Open Cursor 3.6.6 on Windows.
Open a new, empty workspace folder.
Open the Source Control / Changes panel.
Click Initialize Repository.
Observe that nothing appears to happen and the panel continues to show Initialize Repository.
As a second test, create a new folder outside Cursor.
Run git init in that folder.
Add a few files, for example .txt files.
Verify in the terminal that Git sees the repository and the untracked files using git status.
Open that folder in Cursor.
Observe that Cursor still does not detect it as a Git repository and continues to show Initialize Repository.

Expected Behavior

Cursor should detect that the opened folder is a Git repository and show the Source Control file changes.

For a newly initialized repository with untracked files, the Source Control panel should show those files as untracked.

Screenshots / Screen Recordings

Operating System

Windows 10/11

Version Information

Version: 3.6.6 (user setup)
VS Code Extension API: 1.105.1
Commit: 3f10403086781d5b0f56e42812ba28c053a44ec0
Date: 2026-05-25T06:45:30.850Z
Layout: glass
Build Type: Stable
Release Track: Nightly
Electron: 39.8.1
Chromium: 142.0.7444.265
Node.js: 22.22.1
V8: 14.2.231.22-electron.0
xterm.js: 6.1.0-beta.220
OS: Windows_NT x64 10.0.26200

Additional Information

The Git repository itself appears to be valid. Running Git commands in the terminal works as expected.

For example, git status correctly shows that the folder is a Git repository with no commits yet and untracked files.

The issue appears to be specific to Cursor’s Source Control / repo viewer detection, not Git itself.

Console warnings / errors
workbench.desktop.main.js:64 WARN [GlassDiffService] getGitRoot returned empty for known cwd (cwd=, returnedValue=undefined)

workbench.desktop.main.js:64 WARN [GlassDiffService] Refresh reports missing git repository (reason=immediate, cwd=, previousGitRepoRoot=, hasGitContextProvider=true)

Does this stop you from using Cursor

No - Cursor works, but with this issue

Hi Eamon,

This is a known bug in the Glass layout’s git integration. Your console warnings (getGitRoot returned empty for known cwd) confirm the exact issue - the Changes panel loses track of the working directory during initialization, causing it to show “Initialize Repository” even though the repo is valid (as your status bar and terminal correctly confirm).

You may find this related thread helpful: Agents Window: GitProvider spawns git without CWD

A few workarounds while the fix is in progress:

  1. Open an Editor Window (Ctrl+Shift+P > Open Editor Window) — its Source Control panel works correctly for the same repos.

  2. Reload Window (Ctrl+Shift+P > Developer: Reload Window) — sometimes re-establishes the connection, though it may not work consistently for newly initialized repos.

  3. Fully quit and reopen Cursor (not just reload) — this has resolved it for some users.

Our team is actively working on this.