git不被识别为内部或外部命令窗口 - 已尝试更改环境变量 [英] git is not recognized as an internal or external command windows - already tried to change the environment variable
问题描述
我得到以下错误,git不被识别为内部或外部命令,可操作程序或批处理文件。
我在一些论坛上看到我需要添加/ bin& / cmd路径到'系统变量'
我已经完成了,但仍然遇到了同样的错误。已经由电脑重新启动。想法?
I got the following error, git is not recognized as an internal or external command, operable program or batch file. I read in some forums that i need to add the /bin & /cmd paths to 'System variable' I've done that but am still running into the same error. Already restarted by computer. Ideas?
推荐答案
同样的问题,我设置了环境变量,但仍然无法从命令窗口使用git。 最后,当我将路径变量值添加到中时,它起作用:
Had same issue , I had setup the environment variables but still was not able to use git from command window . Finally it worked when I added the path variable value to
C:\Program Files\Git\cmd
而不是
instead of
C:\Program Files\Git\cmd
如果您在安装过程中从命令提示符中选择使用GIT的选项,则也会自动填充,如下所示:在这里输入图片描述
This will also be populated automatically if you select the option of use GIT from command prompt as shown below during your installation process .enter image description here
这篇关于git不被识别为内部或外部命令窗口 - 已尝试更改环境变量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!