简体   繁体   English

在 Visual Studio 代码中无法识别 git

[英]git not recognised in visual studio code

The issue is Vs code does not recognise the as they say "out of the box git" in their editor..问题是 Vs 代码无法识别他们在编辑器中所说的“开箱即用的 git”。

So I have installed git 5 times, re installed vs code 5 times, restarted the computer every time plus checked all the environment variables and have been googling the problem for 2 days..所以我已经安装了 5 次 git,重新安装了 5 次 vs code,每次都重新启动计算机,并检查了所有环境变量,并且已经在谷歌上搜索了 2 天的问题。

Nothing is solving this problem other than a fresh install of the windows on the computer.除了在计算机上全新安装 Windows 之外,没有什么可以解决这个问题。 I have no clue where to turn to next..enter image description here我不知道下一步该去哪里……在此处输入图片说明

Images of issue..问题图片..

第一的

第二

第三

I believe the issue is that you are setting the git.path setting in your workspace settings as opposed to your user settings .我认为问题在于您在工作区设置中设置了git.path设置,而不是您的用户设置

As detailed in the vscode docs , 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).vscode 文档所述,出于安全原因,必须将与外部可执行文件(例如 git)相关的许多设置放在用户设置中(否则,例如,您可以克隆指定恶意可执行文件而不是实际 git 可执行文件的项目)在项目的工作区设置中,从而给您带来麻烦)。

If that git path is indeed correct, then moving the setting to the user settings should resolve the issue如果该 git 路径确实正确,则将设置移至用户设置应该可以解决问题

检查您的系统环境变量并确保您在路径中添加了 git 路径 (C:\\Program Files\\Git\\bin)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM