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

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

问题描述

Visual Studio Code 报告您的系统上似乎未安装 git."当我尝试切换到 git 视图时.我知道我已经安装了 git 并被其他 git 客户端使用.我想如果我按照 Visual Studio Code 的说明(用 Chocolatey 安装它或从 git-scm.com 下载它")重新安装 git,它可能可以解决问题,但我不想弄乱现有的 git我系统上的客户.有没有可靠的方法来配置 Visual Studio Code 以便它可以找到现有的 git 安装?

解决方案

Visual Studio Code 只需在您的 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 Code 无法检测到已安装的 git的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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