chore(git): add gitattributes for line ending normalization

This commit is contained in:
Xiaoxia AI
2026-06-18 15:22:56 +08:00
parent 4d574db2c6
commit c7c3f0a539
+38
View File
@@ -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