Abu*_*e10 7 windows git command-line environment-variables
使用该git init命令时,我在命令提示符下收到以下错误消息.我正在使用运行Windows 7的Windows PC.
C:\rails_projects\first_app>git init
'chcp' is not recognized as an internal or external command,
operable program or batch file.
Reinitialized existing Git repository in C:/rails_projects/first_app/.git/
'chcp' is not recognized as an internal or external command,
operable program or batch file.
Run Code Online (Sandbox Code Playgroud)
我是Ruby on Rails的新手,我正在尝试为我的Rails项目创建一个存储库.当我使用诸如rails new first_app或者rails server我没有收到消息的git init命令时,只有当我使用该命令时它才显示出来.此外,正如您所看到的那样,命令仍能正常运行(即Reinitialized existing Git repository in C:/rails_projects/first_app/.git/),但每次执行命令时都会看到错误消息,这很烦人.
有谁知道如何解决这个问题? 我找到一个链接,告诉我我需要将控制台切换到Windows-1252 http://illegalargumentexception.blogspot.com/2009/04/i18n-unicode-at-windows-command-prompt.html#charsets_1252但是没有工作.
我感谢任何帮助,谢谢!
man*_*lds 18
查看您的PATH环境变量是否设置正确.任何系统都应该在PATH上至少有以下内容
;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;
Run Code Online (Sandbox Code Playgroud)
如果不存在,请添加上述内容.
添加后,打开一个新的cmd/bash并尝试:
where chcp
Run Code Online (Sandbox Code Playgroud)
它应该给出路径.
然后再试git init一次
| 归档时间: |
|
| 查看次数: |
20052 次 |
| 最近记录: |