Home  >  Article  >  Development Tools  >  vscode prompts that the git path cannot be found

vscode prompts that the git path cannot be found

王林
王林Original
2019-11-06 13:06:476172browse

vscode prompts that the git path cannot be found

安装完最新的 vscode 后发现,默认找不到 git.path,需要自己手动设置。

解决方法:

1、打开 cmd 查找自己的 git 安装路径

>where git
C:\Program Files\Git\cmd\git.exe

2、打开 vscode 设置,在右侧用户配置中添加如下:

"git.path": "C:\\Program Files\\Git\\cmd\\git.exe"

覆盖默认 git.path 配置,此处后面参数需要和你的 git 安装路径一致,不要填写 git-bash.exe 路径。

注意:vscode 的配置其实就是 json 文件,所以用户配置除了最后一行,其他行配置均需要添加逗号。

推荐教程:vscode教程

The above is the detailed content of vscode prompts that the git path cannot be found. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:what is vscodeNext article:what is vscode