When cloning the repository in Cursor, it gets stuck on “Scanning folder for Git repositories” under the Source Control tab, as shown in the screenshot. The issue persists even after waiting for 30 minutes to an hour. In most cases, a complete reinstallation is required, and even that does not consistently resolve the issue. Can anyone help me with the fix ?
Steps to Reproduce
Sometimes it’s hangs forever
Expected Behavior
Git repositories should be detected and displayed normally
Source Control should become available for regular use.
This is a known bug with the Git extension’s repository scanning. It has been reported across multiple Cursor versions on Windows. A few things you can try:
Change the repository detection mode. Open Settings (Ctrl+,), search for git.autoRepositoryDetection, and set it to openEditors. This skips the directory scan and only detects repos for files you actually open. This is the most effective workaround.
Restart the built-in Git extension. In the Extensions panel, search for @builtin git, click the gear icon on “Git”, choose Disable, then Enable it again, and Reload the window.
Open the project folder directly rather than a parent or higher-level directory.
The source control in Cursor IDE shows “Scanning for Git repository…” infinitely when the IDE is opened for the first time after system startup
I am having to restart cursor for the source control to recognise my git repository and pull up the current branch and changed files etc.
Issues is when opening for the very first time after system startup it isn’t recognising the git.
Steps to Reproduce
Turn on system → Open Cursor IDE → source control extension
Expected Behavior
Shows the text “Scanning for git repositories…” infinitely
A couple of follow-up questions to narrow this down:
After changing git.autoRepositoryDetection to openEditors, did you reload the window (Ctrl+Shift+P > Developer: Reload Window)? The setting won’t take effect until the window is reloaded.
Are you opening the project folder itself (the one containing .git), or a parent directory that contains multiple projects?
Does the same project work normally in VS Code (not Cursor)?
Could you check if there’s a rg (ripgrep) process consuming high CPU while the scanning hangs? Open Task Manager (Ctrl+Shift+Esc), look for rg.exe or ripgrep, and note what path it’s scanning.
Today, on May 19, 2026, at 2:38 AM GMT +3, I encountered the same issue, I opened the git.autoRepositoryDetection. I clicked the gear button, as shown in the image below, and selected “reset settings.” then closed the IDE, then I reopened it, everything functioned properly again.