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 reinstall 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?


当前回答

OS X更新后,我必须运行xcode-select——install才能让GitLens工作。

其他回答

对于基于linux的操作系统:由于路径损坏,我遇到了这样的问题,但我能够暂时修复这个问题,我的Git安装立即恢复。

如果您遇到这样的路径问题,请键入下面的命令

export PATH="/usr/bin:/bin:$PATH"

我只需要从这个链接https://git-scm.com/download/win为windows安装git就可以了

不需要设置环境变量或路径。

背景: 我已经安装了VS Code,和github桌面,我克隆的回购使用github桌面。

当我打开repo时,使用VS Code,我看到了这个错误。

我通过为windows安装git来解决这个问题。

首先在桌面上安装Git,然后在Visual Studio Code中添加包围的扩展,如图所示。

帮我解决了和你一样的问题。

我最近开始使用Visual Studio Code。我有这个问题,只是写Git可执行文件的确切路径解决 这个问题。代码如下:

“git。C:\Program Files\Git\bin\ Git .exe

对我来说有用的是在我的系统中手动添加路径变量。

我遵循了这篇文章中的方法3:

https://appuals.com/fix-git-is-not-recognized-as-an-internal-or-external-command/