I see there are several questions about having no active source control providers in VS code. I get a slightly different error:
No source control providers registered
I am on a mac with a recent both OSx update to Mojave (10.14) and a new version of vscode (Version 1.28.2).
I don't have xcode installed on my machine.
I want to use github.
How can I solve this problem?
I opened a git repo by VS Code, but it shows No source control providers registered . One possible reason is that VS Code couldn't find the executable git command, so we can set the executable path of git in settings. Open File -> Preferences -> Settings , then find the Git: Path setting, click Edit in settings.
Launch VS code, and in the left-hand menu, click on the Source Control icon for Git. It gives two options – Open Folder and Clone Repository. We can open a git repository folder or clone from a GitHub URL. We already set up a GitHub repository in the previous article.
If you don't see the checkbox for adding to source control – Git or Visual Studio Team Services, you can enable this from Options settings. From the main menu, Tools -> Options and then navigate to. Under the Plug-in Selection, you will find it is already set to “None.
Drag Visual Studio Code. app to the Applications folder, making it available in the macOS Launchpad. Open VS Code from the Applications folder, by double clicking the icon. Add VS Code to your Dock by right-clicking on the icon, located in the Dock, to bring up the context menu and choosing Options, Keep in Dock.
This video worked for me. Really weird. But somehow I seem to have disabled my builtin git extension. https://www.youtube.com/watch?v=nFzQnl44_70
I had this issue on Mac OS and I found that I had to go into Code > Preferences > Settings. Search for Git and then Scroll down until the Entry for Git: Path is found. Click edit in Settings. Follow the instructions.
I found the path to Git in a terminal
# which git
/usr/local/bin/git
Add to the end of the override file (in the right hand window of the VS Code settings editor, "" included.)
"git.path": "/usr/local/bin/git",
Now Git works.
Try disabling all extensions, reload, reenable all extensions, reload. I had this issue and re-installed vscode, re cloned my project, and still was getting the error of no source control providers registered. But when I disabled all my extensions, then reloaded, then reenabled, the reloaded it fixed my source control.
I found this question because I was having a similar problem with my vscode + mercurial extension.
My windows is setup as a portable install and mercurial is in one of my conda environments so hg.exe was not found automatically by the extension. I set hg.path = [path to hg.exe"] in my case this line as added to my user settings json file (File->Preferences->Settings, then search for git.path and click Edit in setttings.json):
"hg.path": "C:\Users\myname\anaconda3\envs\py27merc\Scripts\hg.exe"
An equivalent path on the path might be something like "/usr/local/bin/hg" depending how mercurial is installed on your system
git has a similar variable and if you have git installed in fashion so that it cannot be found automatically you might need to set it manually in a similar way like:
"git.path": "/usr/local/bin/git"
assuming that /usr/local/bin/git is where your git executable is located
One that helped me with this issue (in addition to adding "git.path": "/usr/local/bin/git"
):
settings.json
search for "git.enabled": false
and set to "git.enabled": true
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With