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/
推荐文章
- 打开同一目录两次
- 如何从终端/命令行调用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拉另一个分支