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?
当前回答
在我的例子中,GIT安装在我的WIndows 10操作系统上,在PATH变量中有一个条目。但是VS CODE 1.52.1仍然无法从终端窗口检测到它,但在CMD控制台中可用。
通过将终端从PowerShell切换到CMD或Shell + VsCode重启解决了这个问题。
其他回答
在我的例子中,GIT安装在我的WIndows 10操作系统上,在PATH变量中有一个条目。但是VS CODE 1.52.1仍然无法从终端窗口检测到它,但在CMD控制台中可用。
通过将终端从PowerShell切换到CMD或Shell + VsCode重启解决了这个问题。
OS X更新后,我必须运行xcode-select——install才能让GitLens工作。
Visual Studio Code只是在PATH中查找git。为了简单起见,许多UI客户端附带了“可移植Git”,并且没有将Git添加到路径中。
如果您将现有的git客户端添加到您的PATH(以便它可以找到git.exe), Visual Studio Code应该启用git源代码控制管理。
在更新macOS后遇到了这个问题!
再次使用自制软件安装git,它工作了!
brew install git
我最近开始使用Visual Studio Code。我有这个问题,只是写Git可执行文件的确切路径解决 这个问题。代码如下:
“git。C:\Program Files\Git\bin\ Git .exe
推荐文章
- 打开同一目录两次
- 如何从终端/命令行调用VS代码编辑器
- 为什么我需要显式地推一个新分支?
- 如何撤消最后的git添加?
- Rubymine:如何让Git忽略Rubymine创建的.idea文件
- Gitignore二进制文件,没有扩展名
- Git隐藏错误:Git隐藏弹出并最终与合并冲突
- 了解Git和GitHub的基础知识
- 没有。Git目录的Git克隆
- Git与Mercurial仓库的互操作性
- 忽略git中修改(但未提交)的文件?
- “git restore”命令是什么?“git restore”和“git reset”之间有什么区别?
- Git合并与强制覆盖
- 如何在Visual Studio代码中重置设置?
- Git拉另一个分支