From a1c7532eb238e31a81942e846b29650932ed78cf Mon Sep 17 00:00:00 2001 From: xofine Date: Thu, 20 Nov 2025 16:34:53 +0800 Subject: [PATCH] Normalize line endings --- .gitattributes | 37 ++++++++++++++++++++----------------- .gitignore | 10 +++++++++- 2 files changed, 29 insertions(+), 18 deletions(-) diff --git a/.gitattributes b/.gitattributes index a771705..9e79eea 100644 --- a/.gitattributes +++ b/.gitattributes @@ -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 diff --git a/.gitignore b/.gitignore index 4832f39..71a555b 100644 --- a/.gitignore +++ b/.gitignore @@ -5,4 +5,12 @@ *.db *.bat -.env \ No newline at end of file +*.bak +.env + +# Node.js (仅开发环境) +node_modules/ +package-lock.json +npm-debug.log* +yarn-debug.log* +yarn-error.log*