diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..7e75f0a --- /dev/null +++ b/.gitattributes @@ -0,0 +1,21 @@ +# 统一换行:仓库内文本一律 LF,避免跨平台提交产生无意义 diff +* text=auto eol=lf + +# 脚本与 Windows 批处理 +*.sh text eol=lf +gradlew text eol=lf +*.bat text eol=crlf +*.cmd text eol=crlf + +# 二进制文件不做文本转换与 diff +*.png binary +*.jpg binary +*.jpeg binary +*.gif binary +*.ico binary +*.jar binary +*.zip binary +*.pdf binary + +# 锁文件按生成物处理,减少 diff 噪音 +package-lock.json linguist-generated=true