From 1e1cbbee8004ae4cf4732b97f8879fda1b128f76 Mon Sep 17 00:00:00 2001 From: erio Date: Sat, 7 Feb 2026 11:47:03 +0800 Subject: [PATCH] chore: add .gitattributes to enforce LF line endings Ensures consistent line endings for SQL migration files, Go source, shell scripts, YAML configs, and Dockerfiles. Fixes checksum mismatches on Windows where CRLF line endings cause migration hash differences. --- .gitattributes | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 00000000..3db3b83d --- /dev/null +++ b/.gitattributes @@ -0,0 +1,15 @@ +# 确保所有 SQL 迁移文件使用 LF 换行符 +backend/migrations/*.sql text eol=lf + +# Go 源代码文件 +*.go text eol=lf + +# Shell 脚本 +*.sh text eol=lf + +# YAML/YML 配置文件 +*.yaml text eol=lf +*.yml text eol=lf + +# Dockerfile +Dockerfile text eol=lf