添加了crlf2lf.sh脚本用于将项目中的文件从CRLF格式转换为LF格式,并在.gitattributes中设置了文本文件的换行符规则,确保所有文本文件使用LF作为换行符。
@@ -0,0 +1 @@
+* text=auto eol=lf
@@ -0,0 +1,9 @@
+# 使用Git Bash运行
+# 需要先安装<chocolatey>
+# 安装命令:iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
+# 若安装过程提示无权限执行脚本,则:Set-ExecutionPolicy Bypass -Scope Process -Force
+# 并且删除<C:\ProgramData\chocolatey>目录。
+# 安装完成后使用<choco --version>查看版本,确定安装成功
+# 安装<dos2unix>:choco install dos2unix
+
+find . -type f -name '*' -print0 | xargs -0 dos2unix