windows中的换行符为 CRLF, 而在linux下的换行符为LF 解决: //禁用自动转换 git config --global core.autocrlf false 参考:http://stackoverflow.com/questions/5834014/lf-will-be-replaced-by-crlf-in-git-what-is-that-and-is-it-important 转载于:https://my.oschina.net/homeemail/blog/707454