有时把windows 上的文件复制到linux 上时,文件末尾会出现 ^M,
可以运行以下命令将文件夹下的所有文件进行修改
find . -type f -exec dos2unix {} \;
对单个文件进行转换命令如下:
dos2unix 文件名
git提交文件格式设置:
git config --global branch.autosetuprebase always #重要:pull同步代码之后对本地分支进行rebase而不是merge,减少不必要的合并
git config --global pull.rebase true #重要:pull同步代码之后对本地分支进行rebase而不是merge,减少不必要的合并
git config --global gui.encoding utf-8 #UI采用utf-8编码
git config --global i18n.commitencoding utf-8 #采用utf-8编码提交log
git config --global i18n.logoutputencoding utf-8 #log输出采用utf-8格式
git config --global color.ui auto #打开彩色输出
git config --global core.ignoreCygwinFSTricks true #解决windows系统下速度慢的问题