Visual Studio代码无法检测到已安装的git [英] Visual Studio Code cannot detect installed git

查看:525
本文介绍了Visual Studio代码无法检测到已安装的git的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Visual Studio代码报告它看起来像git没有安装在你的系统上。当我尝试切换到git视图时。我知道我有git安装并被其他git客户端使用。我想如果我按照Visual Studio Code的说明重新安装git(用Chocolatey安装它或从git-scm.com下载它),它可能可以解决这个问题,但我不想搞乱现有的git客户端在我的系统上。有没有一种可靠的方法来配置Visual Studio代码,以便它可以找到现有的git安装?

解决方案

Visual Studio代码只是看你的 PATH 用于 git 。为简单起见,许多UI客户端都附带便携式Git,并且不要在路径中添加 git

如果您将现有的git客户端添加到 PATH (以便它可以找到 git.exe ),Visual Studio Code应该启用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?

解决方案

Visual Studio Code simply looks in your PATH for git. Many UI clients ship with a "Portable Git" for simplicity, and do not add git to the path.

If you add your existing git client to your PATH (so that it can find git.exe), Visual Studio Code should enable Git source control management.

这篇关于Visual Studio代码无法检测到已安装的git的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆