Steps to Reproduce:

The Git source provider will activate automatically when you open a folder/file under Git source control. It does not activate (as in your screenshot) when there is no Git repo on disk. You could also click the Git icon shown in the screenshot to initialize a Git repository.
I HAVE a .git folder located under the folder I am opening with Code. But I get "There are no active source control providers" - this worked until just recently. Have made no changes to source control. Something new in the latest release doesn't seem quite right.
@silloy, @chrmarti's explanation is correct. Your installation is working perfectly, given that the Git Init action appears in the screenshot. Just open a git repo or a file inside a git repo and you'll get the features.
@wkc1952 Do you see any error in the Developer Tools?
I'm getting the same problem in Version 1.17.0 (1.17.0) on macOS 10.12.6 after successfully using VS Code to do my commits for a few weeks (yes, there is a .git in my project directory). I found the answer on Stack Overflow - I had to open Xcode after installing an update recently and accept the new terms and conditions (why git needs to be broken until I sign my life away, I'll never understand; thanks Apple!)
For me (Mac) the problem was a recent update to Xcode. I cannot fathom why you have to say “yes” to Xcode’s license in order to use git. I was further thrown by the fact that my copy of tower for git was working fine. Maybe it comes with its own copy of git? But, again, that would seem pretty silly.
I'm in the same trouble
Win 10 Pro 1709 fresh install
My folder has a .git folder, it was recently cloned.
Same issue here. Vscode 1.17.2 just installed.
I have a .git folder I currently use with other editors.
Same, all the sudden this started to appear today. Been using git in VS Code forever. This is on Windows 10. 1.17.2 VSCode
@joaomoreno Reopening for visibility.
Hi all, I have solved on windows after installing git on windows which provides missing executables.
Also works providing the Settings' property:
// Path to the git executable
"git.path": null,
VS Code 1.17.2 --- Linux -- new directory with git enabled and working from command line. I get "There is no active source control providers". Other previously existing directories still have functioning git repositories from within VS Code 1.17.2
Guys please stop hijacking this issue.
If you don't have Git installed, install it.
If you do, and something doesn't work please file an issue and I'll look at it independently.
I think that was where we were going. I've had git installed for ages and
without cause or reason, VS code stopped recognizing it was installed.
I reinstalled git and it managed to resolve the issue, nonetheless, it
would be great to understand _why_
On Fri, Oct 27, 2017, 7:05 AM João Moreno notifications@github.com wrote:
Closed #35741 https://github.com/Microsoft/vscode/issues/35741.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/Microsoft/vscode/issues/35741#event-1313991200, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AT6MMQi-22GyIVE3DXo4iZ2hc7vfvWvuks5sweMigaJpZM4PwsO-
.
I use msys2 git ,repositoryRoot start with '/d/...', I changed it into 'D:/...', git works
Broken add-on for me. un/reinstalled platform-io & native debugger. All is well.
The same problem happened to me on Windows after updating to version 1.18.0, to fix the problem I just had to go to File -> Preferences -> Settings and then set the git path:
"git.path": "C:/Users/<username>/AppData/Local/GitHub/PortableGit_<numbersandletters>/cmd/git.exe"
Same problem for me on Win7. Updated to 1.19.0 insiders and VSCode stopped recognising git repos. Setting the git.path as described above fixed the problem for me.
This is a bug in VSCode's detection of git. People are still encountering this bug so this issue should be re-opened until the underlying problem is fixed. Setting the git.path or reinstalling git is just a workaround which shouldn't be necessary (and previously hasn't been)
I though this was happening to me because of the upgrade to 1.18.1, but it actually happened because upgrading to High Sierra somehow made git non-runnable from the command line. I was getting a xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun when trying to run git from the command line.
If you're on a mac and just upgraded to High Sierra, you can fix simply by running xcode-select --install. Then just restart vscode, and you're good to go.
After updating to Mac OS High Sierra, and then 1.18.1 I had this issue.
I had to do the following:
Code -> Preferences -> Settings -> add the line "git.path": "/usr/local/git"
After updating to Windows 1.19.0-insider I had the same issue.
Adding "git.path" works, but this is only a workaround.
Please fix this.
For Windows, you can edit your File -> Preferences -> Settings and then set the git path to the same settings as shown in PATH in your Environment Variables. After that, you should see a small Git icon shows on the source control panel. Click that and add the folder to initialize your git repository.
Yep I had the same isse, it stopped working for me out of the blue (same OS, same git, etc) and adding "git.path": null, seemed to have fixed the issue.
For me, it doesn't work even after I set the "git.path" as described above.
I'm using msys64 on Win7
Git works very well from the terminal, but vscode is not recognizing git folders.
I also get a lot for the following in the output:
git rev-parse --show-toplevel
fatal: Not a git repository (or any of the parent directories): .git
Of course, the .git folder is there.
Plus, running "git rev-parse --show-toplevel" in vscode terminal, returns the folder where the .git is located ...
after updated to 1.18.1 , then I had this problem , after put git path , then it solve the problem,
"git.path": null
after updated to 1.18.1 , then I had this problem , after put git path , then it solve the problem,
"git.path": null
I am having this issue too.
v1.18.1Same here.
No. No fault of 'missing git'. Before udate to 1.18.1 everything was fine.
Reinstalled VSTeam services extension - was fine for a moment. Last activities - commiting project before update -> update.
v1.18.1
Windows 10
Most helpful comment
I HAVE a .git folder located under the folder I am opening with Code. But I get "There are no active source control providers" - this worked until just recently. Have made no changes to source control. Something new in the latest release doesn't seem quite right.