microsoft / microsoft/vscode

VS Code Source Control cannot detect Git repository, but Git works in terminal

Open
#329,803 0 comments 0 reactions 1 assignee Claimed by @lszomoru View on GitHub
Dominant language
TypeScript
Stars
193k
Forks
42.4k
PR merge metrics
PR metrics pending

Description

Git repository scanning not working in VS Code Source Control

Does this issue occur when all extensions are disabled?: Yes

VS Code Version: 1.132.0
OS Version: win11 25H2
Git Version: git version 2.54.0.windows.1
Steps to Reproduce:
Open VS Code.
Open a folder that contains a valid Git repository.
Open the Source Control panel.
Wait for VS Code to detect the Git repository.
Expected Behavior:

VS Code should automatically detect the Git repository and display source control information, including changed files and Git actions.

Actual Behavior:

VS Code does not detect the Git repository.

The Source Control panel remains stuck on:

Scanning folder for Git repositories...

or does not show any repository.

Git works correctly from the terminal:

git --version
git status

Both commands execute successfully, and the repository is valid.

Additional Information:
The issue only occurs inside VS Code Source Control.
Git commands work normally from the terminal.
The repository contains a valid .git directory.
Restarting VS Code does not resolve the issue.
Disabling all extensions does not fix the problem.

Git: Show Git Output
Logs:

Help → Toggle Developer Tools → Console

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.