'Git missing in VS Code – No source control providers
I just installed Visual Studio Code 1.17 and opened a Git repository folder. When entering the Source Control tab I see a message "There are no active source control providers". I thought Git was baked into VSCode!?
To make matters worse, when I attempt to install additional SCM providers there is no option for Git. How do I get my Git back!?
Solution 1:[1]
What helped me is setting the value of git.path setting to the full path of my git.exe file. After that I was able to see the git logo:

Solution 2:[2]
Wow I spent so long on this. For me I had to go to the Extensions area > then click the ... at top right of menu > Show built-in Extensions
Git built-in extension was disabled!!
Solution 3:[3]
Are you using MacOS? If you've updated Xcode lately, you may need to accept Xcode's terms of service agreement to use git.
$ sudo xcodebuild -license accept
Solution 4:[4]
I had this too. tried overriding the default git.path setting but that didn't work. What seemed to fix it for me was opening an existing repository .. just an empty folder that I created and did a 'git init' in at the command prompt. After I opened that folder I could click the Source Control button and it had all the git functions available and no longer said "There are no active source control providers". Furthermore, doing File->Close folder got me back to where I started. Another way was to click the small "branch" button ABOVE that message ("There are no active ...") and initialise a repository. This message is very confusing!
Solution 5:[5]
Visual Studio Code does come with in integrated Git source control provider. However, in order for that to work, Git itself needs to be installed on your system as well. So just download and install Git on your machine, and Visual Studio Code will also be able to use it.
While the source control panel does not tell you this, but unfortunately just stays quiet about it, not offering anything, there is a way to have VS Code tell you this: On the “Welcome” page that is displayed when you start the application, there is a link “Clone Git repository…”. If you click there, VS Code will tell you that Git is missing:

Once you have installed Git and restarted Visual Studio Code, you will see a small Git icon at the top of the source control panel (unless you already have a repository opened of course):

This will tell you that Git is there and you can click the icon to initialize a repository—or just open an existing repository.
Solution 6:[6]
For me, the solution was (on Mac) Code > Settings > User Settings > Extensions > Git
Check the (unchecked) box next to Enabled - Whether git is enabled.
Solution 7:[7]
Simplest steps what worked for me:
1. Download and install Git on your machine as mentioned in Poke's answer.
2. Restart VS Code.
3. Open Command Prompt (Crtl+Shift+P) and write 'Git: Initialize Repository' and choose a folder you like (it can be even a temp folder).
4. Finally Git logo appears as shown in Torvin's answer and then its easy to set up your git account and start using it.
Solution 8:[8]
You need initialize (git init in terminal) your project/folder, that your VS Code to be able to see his as git-project.
Enter in your project/folder through terminal
cd ~/ImbaFolder
git init (it created .git file - the git repository)
Then your VS Code will to see that it is git repository, and it will works.
Solution 9:[9]
Open Visual Studio Code, click left-bottom ?? (gears) and select Command Palette.
Search for the word "enable", and select Enable All Extensions.
Solution 10:[10]
If this helps; I did face the same issue with the latest version of VS Code and tried all the mentioned tips, but no luck. Finally, I added a folder to a workspace, saved that workspace, and then when I checked the repo icon, could see the small git icon and can as well clone a repo from the command palette.
Raised an issue for this and commented the same findings. Can be found here https://github.com/Microsoft/vscode/issues/49469
Solution 11:[11]
So, I tried all sorts of things to get this to work. I tried "git.path": "/usr/bin/git", adding git directly to my path, etc. Nothing worked.
Finally, I realized that in my VSCode workspace settings, I had "git.enabled: false". I changed it to true, and it works like a charm.
Solution 12:[12]
My plugin was disabled, just enabled it.
- Go to extension(click on the extension icon on the left),
- Serach for @builtin git,
- Enable the git default built in extension,
- It started to work for me again.
Solution 13:[13]
Try xcode-select --install. In macOS git is attached to XCode’s Command line tools
Solution 14:[14]
Tested in VsCode on Windows dev PC.
What worked for me was to enter Settings by hitting Ctrl + , at least on my machine and then enter the following setting: SCM.provider.AlwaysShowProviders
Then just ticked the checkbox and Git was lighting up again and I could then go to Source Control by Ctrl+shift+G.
Solution 15:[15]
Since i installed GIT in custom defined path, i needed to reference it inside settings.json
( F1 > settings.json > enter )
Add setting:
"git.path": "<custom path to git.exe>"
Wich in my case made it look like:
{
"terminal.integrated.shell.windows": "C:\\WINDOWS\\System32\\cmd.exe",
"git.path": "<custom path to git.exe>"
}
Right after it worked perfectly.
Solution 16:[16]
So I tried nearly every answer and nothing.
- Re-install Git
- Initialize an empty repository locally with git init
- Checked to make sure the @builtin git was enabled
- Restart VS Code multiple times
I ended up trying Ctrl + shift + G and noticed a command at the bottom of VS code.
All I did was press the G key and the icon suddenly appeared and everything works perfectly!
Solution 17:[17]
I ran into the same problem and figured out that VSCode does not recognize git repo unless it is added to a workspace.
So, add the folder you want to be tracked via Git into a workspace and git will be enabled automatically.
Solution 18:[18]
I did not see the Git controls until I created a file and saved the current workspace - suddenly "Source Code Control" showed the Git Icon and I could initialize a new Git repo.
Cloning an existing repo seems to be unsupported in VS Code, and I guess that is the reason that Git controls are hidden until there is a workspace where a new repo can be initialized.
Solution 19:[19]
Solution For Mac Users
This is simple way and this way has been solved my problem on Mac:
1) Run this command on console :
sudo xcodebuild -license accept
2) Close Visual Studio Code and reopen it.
That's it.
Note : If you are using MacOS and you have updated your Xcode recently, you may need to accept XCode's terms of service agreement to use git.
Solution 20:[20]
I just fixed this problem. I newly installed VS Code and this problem occurs.
OS: Ubuntu 18.04.2
On my source control tab, it shows "no source control providers registered".
Here's how I fixed this problem.
- Edit the setting file, set the gitpath to
/usr/bin(mygitdir) - Run
git initcommand in my project folder - Press ctrl+shift+P and run "reload window" command
And this problem is fixed.
Solution 21:[21]
I found that VScode stopped tracking after I checked out a different branch (new one). What solved it was simply:
- Closing the working folder.
- Reopening the folder.
VSC then synced with the new branch and showed the differences.
Solution 22:[22]
If SCM view is empty you need to install a source code provider.
Check Extensions (Ctrl+Shift+X) under View and select the SCM provider you want. Start typing @ca and you will see extensions listed. Select @category: “scm providers” to see available SCM providers.
If you don’t see Git here you need to install Git. Here’s their download page for windows. https://git-scm.com/download/win
After installing you’ll see Git Extensions for VS Code listed under Extensions view. Select it and click install on the right hand side panel that appears.
After installing the SCM remember to close and reopen VS Code.
Solution 23:[23]
Scenario: For MAC + issue afer installing/updating xcode:
Can also happen when you install xcode and yet to accept the license terms. To accept the terms, just run the below.
sudo xcodebuild -license
Post to this restart VS code & you are good to go.
Solution 24:[24]
The reason for this problem is that Git is not initialized in the folder that you are trying VS Code to open (this is for Windows 10).
- Install Visual Studio Code from https://code.visualstudio.com/download
- Install Git from https://git-scm.com/
- Create a folder named
gitin:C:\Users\YourName\so it will look like thisC:\Users\YourName\git(<-- you can pick any directory) - While you are in that folder, right-click >
Git GUI Here>Create New Repository - In pop-up window
Browsefor the folder you just created (to initialize Git there) > clickCreate - This will create a
.gitfile in that folder - Open VS Code >
File>Open Folder> (select the folder you just initialized Git at)
Solution 25:[25]
Just close the editor and reopen. That did the job for me.
Solution 26:[26]
Solution 27:[27]
That is because the built-in git is disabled in your vs code either because of installing any git package or you accidentally disable it.
For enable it
- Go to vs code.
- Open extensions and search for @builtin git.
- Now you will see a git extension in it.
- Now click enable if it is disabled.
- And visit source control. You will see the clone repository
Solution 28:[28]
Adding another solution in case someone like me runs in to this again.
I had just setup a new node project and I was getting this. I had to create a .gitignore file and add node_modules to it and then vscode looked correct. From what I can tell it might be because there are other git repos in the my node_modules and vscode was seeing those as well. Not sure the technical reasons but that seems to have fixed it for me.
Solution 29:[29]
I see that Cygwin isn't mentionned here. It happened to me and I found the solution https://github.com/Microsoft/vscode/issues/7998#issuecomment-245356777.
If you are using Git from Cygwin.From Windows terminal, execute the following command :
> cd c:\
> md cygdrive
> cd cygdrive
> c:\ - mklink /j "c" c:\
(Assuming that git is stored in the following folder : C:\Cygwin\bin\git.exe)
Now, restart VSCode
Solution 30:[30]
None of this worked for me. Was annoyed so much that I swept cleaned my installation to see if that makes a difference. That also did not work.
What worked was
Click on View > Open View > Source Control
This will open the git view.
When the git view is shown, right click on the Icon > Click on "Keep"
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow






