Why? So that you can check your node_modules folder into git, whether or not there are mixed line endings in files.
sudo port install dos2unix
And then use it:
find path/to/bad/files/ | xargs dos2unix
git add whatever you like and you'll be good to go!
How about the core.autocrlf setting in git? http://help.github.com/line-endings/
@walter: Hey, you're totally right.
The main issue is that if you try to git add a bunch of files at the same time, even with that setting set correctly, it will complain about mixed line endings and prevent your from adding those files.
This generally only happens when you try to git add files that are built or auto-generated, or that someone else wrote on a windows computer AND a linux machine, leading to mixing.
Growth Engineer at Credit Karma & consultant. Past clients include Aconex, Triplebyte, Neo, Brown Computer Science Department, Voxer, Cloudera, and the Veteran's Benefits Administration.