Prechádzať zdrojové kódy

换行符兼容问题

Zachary 1 deň pred
rodič
commit
8d41268bde
1 zmenil súbory, kde vykonal 38 pridanie a 0 odobranie
  1. 38 0
      .gitattributes

+ 38 - 0
.gitattributes

@@ -0,0 +1,38 @@
+# 统一使用 LF 换行符,避免多系统(Linux/macOS/Windows)换行符冲突
+* text=auto eol=lf
+
+# 明确标记为文本的文件类型
+*.js text eol=lf
+*.ts text eol=lf
+*.json text eol=lf
+*.css text eol=lf
+*.scss text eol=lf
+*.html text eol=lf
+*.vue text eol=lf
+*.md text eol=lf
+*.xml text eol=lf
+*.yml text eol=lf
+*.yaml text eol=lf
+*.txt text eol=lf
+*.sh text eol=lf
+*.bat text eol=crlf
+*.cmd text eol=crlf
+.gitignore text eol=lf
+.gitattributes text eol=lf
+
+# 二进制文件不处理换行符
+*.png binary
+*.jpg binary
+*.jpeg binary
+*.gif binary
+*.ico binary
+*.ttf binary
+*.woff binary
+*.woff2 binary
+*.eot binary
+*.mp3 binary
+*.mp4 binary
+*.zip binary
+*.icns binary
+*.dmg binary
+*.DS_Store binary