This will work automatically for future commits.
For existing files, we have to manually normalize
them once and only once, with following command:
find . \( -path './.git' -o -path './build*' -o \
-path './src_gen' \) -prune -o -type f -print |\
One caveat of dos2unix is, even though it claims
by default only convert line breaks and skip
binary files, it actually depends, e.g., some
UTF-16 files could be messed up; and the BOM in
some UTF-8 files could be removed unexpectedly.
Therefore, after running the above command, make
sure to use git diff to see if there's any such
kind of unexpected change, and those files can be
restored via git checkout.