Wednesday, April 8, 2009

GIT Warning: LF will be replaced by CRLF

I am using msysgit on windows 2000

After setting up the repository and when I tried to add files to GIT index (inorder to have my files considered for next commit) ........ I got

Warning: LF will be replaced by CRLF in FILENAME

After googling I found this a default GIT setting and can be overridden by issuing

git config core.autocrlf false

in Bash mode


A note on LF & CRLF

Most Unix operating systems represent the end of each line with a line feed (LF) character. However, the Windows operating system represent the end of line with both a carriage return (CR) and a LF.

8 comments:

Caroline said...

Thank you, you are a darling.

Scotty said...

You may wish to set this globally instead:

git config --global core.autocrlf false

txomon said...

thank you! that helped me!

kovpack said...

thanx, cause i was already frightened what was that. just decided to learn how to use git and control of versions, so i'm new to this.

kovpack said...

but will its turning off influence something when code was written under windows, then added to git, and then got by someone on linux?

Anonymous said...

Thanks for you clear posr

Zequez said...

Thanks, that solved it ^^

Chris Chinchilla said...

Thanks! Most helpful :)