From ecd5925b2cc682e1ac4050f18c3d80080c340b92 Mon Sep 17 00:00:00 2001 From: Donny Date: Thu, 5 Nov 2026 02:00:03 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E5=8A=A0=20.gitattributes=EF=BC=8C?= =?UTF-8?q?=E4=BB=93=E5=BA=93=E5=86=85=E7=BB=9F=E4=B8=80=20LF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitattributes | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..4e3e664 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,29 @@ +# 统一换行符:仓库内一律 LF,避免 Windows/Linux 交叉提交产生整文件 diff +* text=auto eol=lf + +# 二进制:不做换行转换,也不做文本 diff +*.png binary +*.jpg binary +*.jpeg binary +*.gif binary +*.ico binary +*.pdf binary +*.zip binary +*.whl binary +*.so binary +*.dll binary + +# Windows 专有脚本保持 CRLF,否则 cmd/powershell 可能解析异常 +*.bat text eol=crlf +*.cmd text eol=crlf +*.ps1 text eol=crlf + +# 语言统计:让 .py 之外的文本也按行处理 +*.md text +*.yml text +*.yaml text +*.toml text +*.sql text + +# lock 文件不参与 diff 统计噪音 +uv.lock linguist-generated=true