4

I work on Mac OS, but to date this problem has only occurred on my MacBook Air with an SSD hard drive. I do a fresh checkout of a number of different repos and status shows me a long list of modified files (without touching anything). It seems to be third party javascript and css files. That with what else I've read seems to be line endings, but despot setting:

git config --global core.autocrlf input

As suggested here http://help.github.com/line-endings/ and then checking out. Has the same problem.

Help =(

4

2 回答 2

0

正如另一个答案所指出的,

git config --global core.autocrlf false

如果您有将行结尾正确存储为 crlf 的文件,您还应该禁止突出显示“cr”。Git diff 和其他补丁输出将突出显示可能有问题的空白。您可以通过以下方式抑制它:

git config --global core.whitespace cr-at-eol

请记住,--global当您以同一用户身份登录机器时,这将使您的所有存储库都有效。要将设置应用于任何用户,请--system改用。相反,您可以使用--local. --local如果没有给出范围选项,则隐含。

于 2012-05-28T20:30:49.420 回答
0

先试试吧:

git config --global core.autocrlf false

这将阻止任何“自动”转换。

另请参阅“使用代码分发 git 配置”以了解管理 eol 的替代方法。

于 2012-05-28T19:20:01.497 回答