简体   繁体   English

“git config --edit --global”说-找不到命令

[英]"git config --edit --global" says - command not found

I have been trying to access the Eclipse IDE through the above command line (after setting my username and email with git config --global user.name and git config --global user.email respectively) and every time I do, it shows me the following on the command line: I have been trying to access the Eclipse IDE through the above command line (after setting my username and email with git config --global user.name and git config --global user.email respectively) and every time I do, it shows me命令行中的以下内容:

It keeps saying "command not found" .它一直说“找不到命令”

I have tried making changes through environmental variables but it still did not work.我尝试通过环境变量进行更改,但它仍然不起作用。

It's not a problem with git itself. git 本身没有问题。 The problem in on the first line in your picture git config --global core.editor "code --wait --new-window"图片第一行的问题git config --global core.editor "code --wait --new-window"

It changes your default editor, but code is not reachable.它会更改您的默认编辑器,但无法访问code Verify if you have Visual studio code installed, or change the editor to something else.验证您是否安装了 Visual Studio 代码,或将编辑器更改为其他内容。 You shouldn't need such heavy editor to edit your gitconfig to be honest.老实说,您不应该需要如此繁重的编辑器来编辑您的 gitconfig。

If you are sure that you have VSC installed, check your PATH variable echo $PATH to find out if the path to VSC is there.如果确定已安装 VSC,请检查 PATH 变量echo $PATH以了解 VSC 的路径是否存在。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM