views:

1535

answers:

3

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!

A: 

(removed) 

Loadmaster
+7  A: 

You likely have the core.autocrlf attribute set to true

It's a configuration attribute you can set:

http://www.kernel.org/pub/software/scm/git/docs/gitattributes.html#%5Fchecking%5Fout%5Fand%5Fchecking%5Fin

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
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
A: 

If you're on Vista, it sounds like a bug. Are you moving the files over FTP in ASCII mode by any chance?

If so, force binary mode ;)

krypticmind
No I'm not moving the files over FTP in ASCII mode.
S. Michaels