git远程拉取及提交代码,windows和linux平台换行符转换问题,用以下两行命令进行配置:
git config --global core.autocrlf false
git config --global core.safecrlf true
CRLF是windows平台下的换行符,LF是linux平台下的换行符。
git config --global core.autocrlf false表示提交或者拉取代码时不会进行自动格式转换。
git config --global core.safecrlf true表示拒绝提交混合换行符的代码。
参考博客:https://blog.csdn.net/qq_34707272/article/details/107508411?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522170900040716800227490810%2522%252C%2522scm%2522%253A%252220140713.130102334..%2522%257D&request_id=170900040716800227490810&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2~blog~sobaiduend~default-1-107508411-null-null.nonecase&utm_term=git%20config%20--global%20core.safecrlf%20true&spm=1018.2226.3001.4450https://blog.csdn.net/qq_34707272/article/details/107508411?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522170900040716800227490810%2522%252C%2522scm%2522%253A%252220140713.130102334..%2522%257D&request_id=170900040716800227490810&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2~blog~sobaiduend~default-1-107508411-null-null.nonecase&utm_term=git%20config%20--global%20core.safecrlf%20true&spm=1018.2226.3001.4450