git warning: CRLF will be replaced by LF

I was trying to commit files that were created by other developer and I got the following warning. End of Line is handled differently by different operating systems, so When I modified those files that might have been developed in different os like Windows and tried to commit, this warning comes up.

To resolve the issue, you can set in your config file to let Git automatically handle the end of line.

First commit your changes, then do the following on your Mac,

$ git commit 
$ git config --global core.autocrlf input. # set git configuration
$ git rm --cached -r                       # clear cache
$ git reset --hard                         # reset back to