1

The issue is Visual Studio Code does not recognise the ___ as they say "out of the box git" in their editor...

So I have installed Git five times, reinstalled Visual Studio Code five times, restarted the computer every time plus checked all the environment variables and have been googling the problem for two days...

Nothing is solving this problem other than a fresh install of Windows on the computer. I don’t have any clue where to turn to next...

Images of the issue...

First

Second

Third

4
  • The entry in your settings file has a green line under it, what message does it give? Commented Jun 1, 2018 at 9:08
  • Thanks so much for getting back to me! It says: "Unknown configuration setting.." Commented Jun 1, 2018 at 11:44
  • Likely canonical (2015, 36 answers, and 221 votes): Visual Studio Code cannot detect installed Git. Commented Dec 17, 2022 at 1:58
  • Please review Why not upload images of code/errors when asking a question? (e.g., "Images should only be used to illustrate problems that can't be made clear in any other way, such as to provide screenshots of a user interface.") and provide some text. Thanks in advance. Commented Dec 28, 2022 at 18:32

2 Answers 2

1

Check your System variables environment variables and make sure that you have your Git path (C:\Program Files\Git\bin) added in the path environment variable.

Sign up to request clarification or add additional context in comments.

2 Comments

Thank. It worked for me. I added git path (C:\Program Files\Git\bin) into System Environment and restart Vscode. I don't understand why I am using it normally then I have this problem.
0

I believe the issue is that you are setting the git.path setting in your workspace settings as opposed to your user settings.

As detailed in the Visual Studio Code documentation, for security reasons a number of settings that relate to external executables such as Git must be placed in user settings (otherwise you could, for example, clone a project that specifies a malicious executable instead of the actual Git executable in the project's workspace settings, thus causing you trouble).

If that Git path is indeed correct, then moving the setting to the user settings should resolve the issue.

6 Comments

Thanks for the reply! The same issue is in user settings.. The problem is that git is not recognised in VS code
Positive that is the git path C:\Program Files\Git\cmd\git.exe C:\Program Files\Git\bin\git.exe But just to make sure I have tested both ways multiple time.. The concern is that VS code does not recognise git.. As you can see in the other 2 images above Thanks for the tip I wish this error was that simple though
Curious... Where did you install git from? Also, should have asked before, but can you use git on the command line?
I installed it from the same site that vs code says they get their git from git-scm.com Yes git works in all terminals =)
A bit of a shot in the dark but some comments on github issues have suggested that writing the path in unix style (forward slashes instead of backwards ones) works for some people
|

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.