git init-在'core.autocrlf'中错误的数字配置值'auto' [英] git init - bad numeric config value 'auto' for 'core.autocrlf' in

查看:222
本文介绍了git init-在'core.autocrlf'中错误的数字配置值'auto'的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

15分钟前刚开始使用git并已经遇到了麻烦……该死.

Just started working with git 15 minutes ago and already trouble ... damn.

好吧,正如我在标题中所写的那样,我目前正在使用git-scm本书,网址为: http://git-scm.com/book

Well, just as i wrote in the headline, im currently working with the git-scm book here: http://git-scm.com/book

在2.1-获取Git存储库中,内容为:

如果您开始跟踪Git中的现有项目,则需要 到项目的目录,然后输入

If you’re starting to track an existing project in Git, you need to go to the project’s directory and type

$ git init

那正是我在做什么,但是不知何故,我在这里收到此错误消息:

Thats exactly what im doing, but somehow, i get this error message here:

fatal: bad numeric config value 'auto' for 'core.autocrlf' in C:\Program Files 
(x86)\Git(etc/gitconfig: invalid unit

我按照书中的说明配置了所有内容……在这里有点无助,尤其是因为我对git完全没有经验,而Google在这种情况下似乎没有什么帮助. ._.

I configured everything just as it says in the book ... im kinda helpless here, especially because i got absolutely no experience with git and google doesnt seem to be very helpful in that case. ._.

这是一个屏幕截图,也许可以帮助您:

Heres a screenshot, maybe it helps you:

推荐答案

尝试一个

git config --system --unset core.autocrlf

然后我建议您:

git config --global core.autocrlf false

(请参阅"为什么要在Git中使用core.autocrlf = true?";使用 core.eol设置 比使用repo-wide全局设置更精确)

(see "Why should I use core.autocrlf=true in Git?"; using core.eol settings per files is more precise than using a repo-wide global setting)

如果需要,可以将其设置回系统配置中:

You could set it back in the system config if you want:

git config --system core.autocrlf false

但是要点是'auto'不是有效值:truefalseinput是,例如

But the main point is 'auto' isn't a valid value: true, false or input are, as detailed here.

FernandoZ 建议 查看全文

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