From 48262d6233777fa665dfdbe6a83925417ecd2cd5 Mon Sep 17 00:00:00 2001 From: Codex Date: Mon, 15 Jun 2026 10:52:03 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E6=96=B0=E5=A2=9E=20.gitattributes=20?= =?UTF-8?q?=E7=BB=9F=E4=B8=80=E6=8D=A2=E8=A1=8C=E7=AC=A6=E4=B8=BA=20LF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitattributes | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..0d06b26 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,43 @@ +# 自动检测文本文件并统一换行符 +* text=auto eol=lf + +# 源码强制使用 LF(跨平台一致) +*.ts text eol=lf +*.tsx text eol=lf +*.js text eol=lf +*.jsx text eol=lf +*.mjs text eol=lf +*.cjs text eol=lf +*.json text eol=lf +*.css text eol=lf +*.html text eol=lf +*.md text eol=lf +*.svg text eol=lf + +# 配置类(统一 LF) +*.yml text eol=lf +*.yaml text eol=lf +*.toml text eol=lf +*.conf text eol=lf + +# Windows 专用脚本保持 CRLF +*.bat text eol=crlf +*.cmd text eol=crlf + +# 二进制文件,不做换行符转换 +*.png binary +*.jpg binary +*.jpeg binary +*.gif binary +*.webp binary +*.ico binary +*.woff binary +*.woff2 binary +*.ttf binary +*.eot binary +*.otf binary +*.mp4 binary +*.mp3 binary +*.pdf binary +*.zip binary +*.gz binary