From 602744debd7e7424ddfa47220cc17ef4a5f3468e Mon Sep 17 00:00:00 2001 From: Guichumo <836061373@qq.com> Date: Sun, 22 Nov 2026 23:54:53 +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=AD=96=E7=95=A5=E4=B8=8E?= =?UTF-8?q?=E4=BA=8C=E8=BF=9B=E5=88=B6=E6=96=87=E4=BB=B6=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 文本统一 LF(脚本/sh 强制 LF,批处理 CRLF),仓库现状已全部为 LF,无大规模重写 - png/jar/zip/pdf 等标记 binary,避免文本转换与 diff 噪音 - package-lock.json 标记为生成物 --- .gitattributes | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..7e75f0a --- /dev/null +++ b/.gitattributes @@ -0,0 +1,21 @@ +# 统一换行:仓库内文本一律 LF,避免跨平台提交产生无意义 diff +* text=auto eol=lf + +# 脚本与 Windows 批处理 +*.sh text eol=lf +gradlew text eol=lf +*.bat text eol=crlf +*.cmd text eol=crlf + +# 二进制文件不做文本转换与 diff +*.png binary +*.jpg binary +*.jpeg binary +*.gif binary +*.ico binary +*.jar binary +*.zip binary +*.pdf binary + +# 锁文件按生成物处理,减少 diff 噪音 +package-lock.json linguist-generated=true