From cd0ae5cb470838abe5641de12a9742a75e3da8d3 Mon Sep 17 00:00:00 2001 From: chengma Date: Wed, 8 Jul 2026 08:35:52 +0800 Subject: [PATCH] chore: add .gitattributes to enforce LF line endings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 统一文本文件行尾为 LF,避免 Windows 编辑器把行尾翻成 CRLF 造成满屏噪声 diff。 Co-Authored-By: Claude Opus 4.8 --- .gitattributes | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..85c236b --- /dev/null +++ b/.gitattributes @@ -0,0 +1,16 @@ +# 强制所有文本文件在仓库和检出时统一用 LF,避免 Windows 编辑器/工具把行尾 +# 存成 CRLF,导致每次 diff 满屏“全文件改动”淹没真实改动。 +* text=auto eol=lf + +# 二进制文件不做行尾转换(防御性:即使被误提交也不损坏)。 +*.xlsx binary +*.xls binary +*.png binary +*.jpg binary +*.jpeg binary +*.gif binary +*.ico binary +*.pdf binary +*.zip binary +*.lnk binary +*.db binary