1

I want to add git-bash to Visual Studio Code.

In the normal Terminal I can type where.exe git and git --version.
It shows me the right output.

But when I try to open a default shell in visual studio code it can not find the git terminal.

So I have added some additional variables to the path.
The git.exe and the cmd\git.exe are there.
Additionally, I tried to add the paths to the .json file in Visual Studio Code.

Nothing worked.

My last try was to add the mintyy.exe to the .json file.
This gave me the code down below as output.
In an external mintty terminal:

 rev-parse: Exit 126.
 Failed to run 'rev-parse': No such file or directory

Here I had no choice to open the mintty terminal, it has just opened.
What can I try next?

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
thecode
  • 87
  • 2
  • 12

1 Answers1

0

Open your user setting, and edit "git.path"

It should reference the full path of git.exe.

For instance, I have:

"git.path": "c:\\Public\\gits\\latest\\bin\\git.exe"

Then, in the default terminal, I get:

Windows PowerShell
Copyright (C) Microsoft Corporation. Tous droits réservés.

PS C:\Users\VonC\> git --version
git version 2.23.0.windows.1
PS C:\Users\VonC\>
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250