Visual Studio Code cannot detect installed git

Visual Studio Code reports “It look like git is not installed on your system.” when I try to switch to the git view. I know I have git installed and used by other git clients. I guess if I re-install git following Visual Studio Code’s instruction (“install it with Chocolatey or download it from git-scm.com”), it probably can fix the problem, but I don’t want to mess up the existing git clients on my system. Is there a reliable way to configure Visual Studio Code so it can find existing git installation?

31 Answers
31

Now you can configure Visual Studio Code (version 0.10.2, check for older versions) to use existing git installation.

Just add the path to the git executable in your Visual Studio Code settings (File -> Preferences -> Settings) like this:

{
    // Is git enabled
    "git.enabled": true,

    // Path to the git executable
    "git.path": "C:\\path\\to\\git.exe"

    // other settings
}

Leave a Comment