Git在Windows上将gradlew的行结尾从Unix样式(LF)转换为Windows样式(CRLF)。- 在
windows下新建的sh文件,copy到linux下有的也会报错
解决方法:
一. 根除问题(注意:会删仓库!)
rm -rf .gitgit config --global core.autocrlf false禁用自动转换git initgit add xxx.xx
二. 临时解决问题
vim 出现问题的.sh:set fileformat=unix或set ff=unix设置成unix格式
set ff 或 set ff? 显示当前文件格式