From c7c3f0a53923a32b75580a717371b76e4839b1e8 Mon Sep 17 00:00:00 2001 From: Xiaoxia AI Date: Thu, 18 Jun 2026 15:22:56 +0800 Subject: [PATCH] chore(git): add gitattributes for line ending normalization --- .gitattributes | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 000000000..5d904c0ab --- /dev/null +++ b/.gitattributes @@ -0,0 +1,38 @@ +# 自动检测文本文件并规范化换行符 +* text=auto + +# Python 文件使用 LF +*.py text eol=lf + +# JavaScript/TypeScript 文件使用 LF +*.js text eol=lf +*.jsx text eol=lf +*.ts text eol=lf +*.tsx text eol=lf + +# JSON/YAML 文件使用 LF +*.json text eol=lf +*.yml text eol=lf +*.yaml text eol=lf + +# Markdown 文件使用 LF +*.md text eol=lf + +# Shell 脚本使用 LF +*.sh text eol=lf + +# Windows 批处理文件使用 CRLF +*.bat text eol=crlf +*.cmd text eol=crlf +*.ps1 text eol=crlf + +# 二进制文件 +*.png binary +*.jpg binary +*.jpeg binary +*.gif binary +*.ico binary +*.woff binary +*.woff2 binary +*.ttf binary +*.eot binary