Normalize line endings

This commit is contained in:
XOF
2025-11-20 16:34:53 +08:00
parent d6b4d58ffb
commit a1c7532eb2
2 changed files with 29 additions and 18 deletions

37
.gitattributes vendored
View File

@@ -1,23 +1,26 @@
# [文本统一规范]
* text=auto
*.go text
*.js text
*.css text
*.html text
*.json text
*.md text
*.xml text
*.yml text
*.yaml text
Dockerfile text
Makefile text
go.mod text
go.sum text
# 默认行为LF 换行
* text=auto eol=lf
# 文本文件强制 LF
*.go text eol=lf
*.js text eol=lf
*.css text eol=lf
*.html text eol=lf
*.json text eol=lf
*.md text eol=lf
*.xml text eol=lf
*.yml text eol=lf
*.yaml text eol=lf
*.sh text eol=lf
Dockerfile text eol=lf
Makefile text eol=lf
go.mod text eol=lf
go.sum text eol=lf
# Windows 特定文件用 CRLF
*.bat text eol=crlf
# 二进制文件
*.png binary
*.jpg binary
*.jpeg binary

10
.gitignore vendored
View File

@@ -5,4 +5,12 @@
*.db
*.bat
.env
*.bak
.env
# Node.js (仅开发环境)
node_modules/
package-lock.json
npm-debug.log*
yarn-debug.log*
yarn-error.log*