Where does the bug appear (feature/product)?
Cursor IDE
Describe the Bug
“Git source control / repo view shows ‘repository not initialized’ for all repositories despite them being valid git repos”
Steps to Reproduce
On my system as of this morning all git repositories stopped being recognised by the Cursor IDE UI. It stopped showing changes.
Expected Behavior
The UI does recognise the repositories that the agent does and that it did yesterday. I can work around this with another viewer to check the diffs and manage things.
Operating System
Windows 10/11
Version Information
Version: 3.4.17 (user setup)
VSCode Version: 1.105.1
Commit: 93e603f703cd553a6bb3644711a3379bbbb31180
Date: 2026-05-13T21:39:55.724Z
Layout: glass
Build Type: Stable
Release Track: Default
Electron: 39.8.1
Chromium: 142.0.7444.265
Node.js: 22.22.1
V8: 14.2.231.22-electron.0
OS: Windows_NT x64 10.0.26200
Additional Information
Via the agent which i asked to try and see if it could find the root of the problem:
It reports the following from the git workspace log.
The key pattern — the git extension opens the repo successfully:
[Model][openRepository] Opened repository: d:\dmk-calc
But then periodically fails because git rev-parse --show-toplevel is being called without a working directory:
git rev-parse --show-toplevel [195ms]
fatal: not a git repository (or any of the parent direc
Hypothesis to include: The extension host process CWD is not inside any git repository. Certain Cursor-specific git calls (the “repo view” polling) invoke git rev-parse --show-toplevel without -C or --git-dir, so git falls back to the process CWD and finds nothing. The VS Code source control panel’s calls (which use --git-dir explicitly) work correctly.
Does this stop you from using Cursor
No - Cursor works, but with this issue