[Git] CRLF will be replaced by LF

So i was getting this error in git

warning: CRLF will be replaced by LF in some-file  
The file will have its original line endings in your working directory.  

Turns out another developer was using Windows and i'm on a Mac.

Surprise surprise, Windows and everything else handle end of lines differently.

All i had to do was to follow the steps in the git docs:

$ git config --global core.autocrlf input
# Configure Git on OS X to properly handle line endings
$ git rm --cached -r . && git reset --hard
# Warning, your local changes will be lost, so commit FIRST

And everyone live happy ever after.

PS. If problems persist, tell the windows developers to change the line endings settings in their IDE.


Git help