'git'不被识别为内部或外部命令 [英] 'git' is not recognized as an internal or external command

查看:6666
本文介绍了'git'不被识别为内部或外部命令的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试在常规Windows cmd或cmd上使用ruby时使用git命令时,出现以下错误。


'git '不被识别为内部或外部命令,
可操作程序或批处理文件。

我该如何解决这个问题?

解决方案你有没有正确设置你的PATH指向你的git安装?



这是你可以做到的:




  • 右键单击我的电脑,

  • 选择属性,
  • 高级,
  • 点击环境变量,

  • 突出显示路径变量,
  • 点击编辑,

  • 将您的特定路径添加到变量值字段的前面,用分号与现有条目分隔。 不要在两者之间加一个空格;和最后一项


When I try to use git command on my regular windows cmd or cmd with ruby, I get the following error.

'git' is not recognized as an internal or external command, operable program or batch file.

How do I fix this problem?

解决方案

Have you correctly set your PATH to point at your git installation?

This is how you can do it:

  • right-click "My Computer",
  • select "Properties",
  • open "Advanced",
  • click "Environment Variables",
  • highlight the "Path" variable,
  • click "Edit",
  • add your specific path to front of "Variable value" field, separated by a semicolon from the existing entry. Do not add a space between ; and last entry

这篇关于'git'不被识别为内部或外部命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆