.gitattributes 945 B

12345678910111213141516171819202122232425262728293031323334353637
  1. # 统一换行符:文本文件使用 LF,避免 Windows 下 CRLF 导致 diff 噪声
  2. * text=auto eol=lf
  3. # 显式声明常见源码文件的换行
  4. *.java text eol=lf
  5. *.vue text eol=lf
  6. *.js text eol=lf
  7. *.ts text eol=lf
  8. *.json text eol=lf
  9. *.yml text eol=lf
  10. *.yaml text eol=lf
  11. *.xml text eol=lf
  12. *.md text eol=lf
  13. *.css text eol=lf
  14. *.html text eol=lf
  15. *.sh text eol=lf
  16. *.sh.example text eol=lf
  17. *.bat text eol=crlf
  18. *.cmd text eol=crlf
  19. *.bat.example text eol=crlf
  20. *.cmd.example text eol=crlf
  21. *.py text eol=lf
  22. # Windows 专用脚本保持 CRLF
  23. *.ps1 text eol=crlf
  24. *.ps1.example text eol=crlf
  25. # 二进制文件,不做换行转换
  26. *.png binary
  27. *.jpg binary
  28. *.jpeg binary
  29. *.gif binary
  30. *.ico binary
  31. *.pdf binary
  32. *.zip binary
  33. *.jar binary
  34. *.class binary