10

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?

enter image description here

Brainmaniac
  • 2,203
  • 4
  • 29
  • 53

8 Answers8

11

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

kaun jovi
  • 555
  • 1
  • 5
  • 21
10

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.

neves
  • 33,186
  • 27
  • 159
  • 192
Ben Castan
  • 126
  • 1
  • 5
1

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.

yabna
  • 99
  • 3
  • 13
1

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

1

One that helped me with this issue (in addition to adding "git.path": "/usr/local/bin/git"):

  • In your settings.json search for "git.enabled": false and set to "git.enabled": true
twknab
  • 1,741
  • 1
  • 21
  • 35
1

Type @builtin in #vscode extensions search bar. We get a list of @builtin extensions. You can disable or enable them. Enable #git and #github extensions if you want #git in #vscode, by default they are disabled.

Bheem
  • 21
  • 2
0

You should install git in your computer and add git.path in VsCode - then it will work

hong4rc
  • 3,999
  • 4
  • 21
  • 40
Brainmaniac
  • 2,203
  • 4
  • 29
  • 53
0

In my case removing .vscode file from root directory did the job. I had the same extensions configured to my other MacBook so I pasted the extensions folder on .vscode file in the same directory and problem solved!

Giorgos Kartalis
  • 874
  • 1
  • 7
  • 14