无法在VSCode OSX中找到git路径 [英] Cant find git path in VSCode OSX
问题描述
所以我在尝试使git和VS Code一起工作时遇到了很多麻烦,我在终端(/usr/bin/git)中找到了git的$ PATH,但是当我尝试在设置中对其进行编辑时.json这似乎不起作用.空留.您还有其他方法可以使它正常工作吗? 我什至尝试在终端中导出$ PATH.
So I've had quite some trouble trying to get git and VS Code to work together, I've found the $PATH for git in terminal (/usr/bin/git) but when I try to edit it in settings.json this doesn't seem to work. Null stays. Do you have any other method to get this working? I've even tried exporting the $PATH in terminal.
推荐答案
我遇到了类似的问题.这是由两个问题引起的:
I had a similar problem. It was caused by 2 issues:
-
在"VS代码"->首选项"->设置"中,确保您输入以下行:
In VS Code -> Preferences -> Settings, make sure you put this line:
"git.path":"/usr/bin"
"git.path": "/usr/bin"
在我的安装中将其设置为null.另外,在最新版本的Code中,用户设置会在侧面窗口中打开,然后在其中添加您的值.
It was set to null in my installation. Also, in the latest version of Code, the user settings are opened in a side window and you add your value there.
- 如果已安装Xcode,请确保将其打开并接受许可协议.在接受Xcode许可证之前,Git拒绝开始安装.
这篇关于无法在VSCode OSX中找到git路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!