Git extension falsely detects repository in empty/new window after updating to latest version
@lszomoru is already working on this.
Since Jun 5, 2026.
Assessment
This issue has not been assessed yet.
Description
VS Code Version
Version: 1.123.0 (Universal)
Commit: 6a44c352bd24569c417e530095901b649960f9f8
Date: 2026-06-03T11:29:03+02:00 (2 days ago)
Electron: 42.2.0
ElectronBuildId: 14159160
Chromium: 148.0.7778.97
Node.js: 24.15.0
V8: 14.8.178.14-electron.0
OS: Darwin arm64 24.6.0 (macOS Sequoia)
Bug Description
Immediately after upgrading to the latest VS Code release (v1.123.0), opening a completely new, blank window (via Cmd + N or File > New Window) causes the built-in Git extension to incorrectly initialize a Git repository
.
The Source Control panel activates and shows thousands of pending changes, scanning upward into a parent directory. Crucially, the File Explorer behaves correctly and remains completely empty (showing only the "You have not yet opened a folder" state), while the Source Control panel is independently stuck tracking a rogue root repository.
This decoupling of the Source Control state from the Explorer state did not occur in previous versions.
Steps to Reproduce
Update VS Code to version 1.123.0 and allow it to restart.
Open a brand new instance/window with no folder or workspace loaded (File > New Window).
Observe the Sidebar. The File Explorer correctly indicates no folder is open, but the Source Control panel activates anyway and begins tracking thousands of changes from a parent or home directory.
Expected Behavior
A newly opened, empty window with no active folder or workspace should not trigger Git repository detection. If the Explorer has no open workspace, the Source Control panel should remain idle.
Actual Behavior
The Git extension auto-detects a repository (likely from a legacy or root .git folder in a parent path) and initializes version control tracking in the Source Control panel exclusively, while the Explorer view remains completely un-focused and empty.
- Dominant language
- TypeScript
- Stars
- 193k
- Forks
- 42.9k
- PR merge metrics
- PR metrics pending
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from microsoft/vscode
-
testplan-item
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
new release
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
testplan-item
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
testplan-item
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
All issues in microsoft/vscode
Similar issues
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:ux-friction issue-rating: 🦞 diamond lobster no-stale P3
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficulty 1/5 Under an hour Newbie friendliness 76/100
-
code-quality refactoring
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
github/gh-aw-firewall#8816 ·
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
langchain-ai/deepagents#6450 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
vercel/react-tweet#225 ·