15

I just ran a

git add -A

on my first git project.

I got back about a thousand responses:

"warning: LF will be replaced by CRLF"

as it went through each file (Ruby files, some are gems).

I deleted my .git directory and tried to disable this default setting by typing this command:

git config core.autocrlf false

Then I tried to add the files again:

git add -A

But I got the same result. Help!

S. Michaels
  • 961
  • 4
  • 10
  • 12

1 Answers1

25

You likely have the core.autocrlf attribute set to true

It's a configuration attribute you can set:

http://git-scm.com/docs/gitattributes#_checking_out_and_checking_in

To make sure that is set to false for all Git projects you can do:

git config --global core.autocrlf false

Hope this helps!

kolrie
  • 12,562
  • 14
  • 64
  • 98
  • 6
    To qualify the last recommendation above, if the core.autocrlf flag is set in a particular project, it will shadow the global setting. Hence, it's still necessary to either set or remove the flag from a project that has it defined locally. – seh Nov 26 '09 at 15:41