解决提交代码到gerrit上后,每行结束都带有\r

在xshell中提交从widows复制进去的代码后,gerrit上每行代码的后面都带有\r,

解决办法:在xshell使用dos2unix命令转换

如转换单个文件:dos2unix file

如转换文件夹:find public/components/ -name "*" | xargs dos2unix    (public/components是批量替换的文件夹   "*"代表所有文件)

猜你喜欢

转载自blog.csdn.net/baidu_33634330/article/details/83273145
今日推荐