From afef4649e5582527f63e7a614a96500076b94974 Mon Sep 17 00:00:00 2001 From: BaconSam Date: Tue, 21 Jul 2026 01:34:59 +0800 Subject: [PATCH] git settings --- .gitattributes | 67 ++++++++++++++++++++++++++++++++++++++++++++++++++ .gitignore | 7 +----- 2 files changed, 68 insertions(+), 6 deletions(-) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..5687877 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,67 @@ +### Java/Kotlin/Spring/Vert.x 项目常用 .gitattributes 模板 ### +### GitHub地址: https://github.com/yanwenkun/git-ignore-and-attributes-for-java ### +### 整理者: code@yanwk.fun ### +### 版本: 20200225-1 ### + +# 参考手册: https://git-scm.com/docs/gitattributes + +# 该行表示 Git 将自动判断文件是【纯文本】还是【二进制】 +# 并将所有【纯文本】统一为 LF 换行符(以下显式指定的扩展名除外) +# 如果用于 Java 以外的项目,请视情况修改为默认方式: +# * text=auto +* text=auto eol=lf + +# 举例说明: +# text 表示将所有 .adoc 扩展名的文件视为纯文本文件 +# eol=lf 表示强制以 LF(即 +) 作为换行符 +*.adoc text eol=lf + +# 指定 CRLF 换行符 +*.cmd text eol=crlf +*.ps1 text eol=crlf +*.bat text eol=crlf + +# 指定 LF 换行符 +*.conf text eol=lf +*.css text eol=lf +*.gradle text eol=lf +*.htm text eol=lf +*.html text eol=lf +*.java text eol=lf +*.js text eol=lf +*.json text eol=lf +*.jsp text eol=lf +*.kt text eol=lf +*.kts text eol=lf +*.map text eol=lf +*.md text eol=lf +*.properties text eol=lf +*.sh text eol=lf +*.ts text eol=lf +*.xml text eol=lf + +# 二级制文件不考虑行尾,不考虑 diff +*.doc binary +*.docx binary +*.eot binary +*.gif binary +*.jpg binary +*.png binary +*.svg binary +*.ttf binary +*.woff binary +*.woff2 binary +*.xls binary +*.xlsx binary + +*.class binary +*.dll binary +*.ear binary +*.gz binary +*.jar binary +*.so binary +*.tar binary +*.war binary +*.xz binary +*.zip binary \ No newline at end of file diff --git a/.gitignore b/.gitignore index 40a0f7a..00a3035 100644 --- a/.gitignore +++ b/.gitignore @@ -1,12 +1,7 @@ *.iml .gradle /local.properties -/.idea/caches -/.idea/libraries -/.idea/modules.xml -/.idea/workspace.xml -/.idea/navEditor.xml -/.idea/assetWizardSettings.xml +/.idea .DS_Store /build /captures