.gitattributes 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. # ---------------------------------------------------------------- 统一换行与二进制
  2. # 目标平台是 Linux(RK3576 / Jetson),开发机是 Windows:库里一律存 LF,
  3. # 避免全仓 diff 被行尾污染;确有需要的格式(bat/cmd/ps1)在 Windows 上检出为 CRLF。
  4. * text=auto eol=lf
  5. *.py text eol=lf
  6. *.pyi text eol=lf
  7. *.c text eol=lf
  8. *.cc text eol=lf
  9. *.cpp text eol=lf
  10. *.h text eol=lf
  11. *.hpp text eol=lf
  12. *.cu text eol=lf
  13. *.sh text eol=lf
  14. *.cmake text eol=lf
  15. CMakeLists.txt text eol=lf
  16. *.json text eol=lf
  17. *.jsonl text eol=lf
  18. *.yaml text eol=lf
  19. *.yml text eol=lf
  20. *.md text eol=lf
  21. *.txt text eol=lf
  22. *.txt.in text eol=lf
  23. *.gitignore text eol=lf
  24. .gitattributes text eol=lf
  25. *.service text eol=lf
  26. *.conf text eol=lf
  27. *.bat text eol=crlf
  28. *.cmd text eol=crlf
  29. *.ps1 text eol=crlf
  30. # 二进制:禁止行尾转换与文本 diff
  31. *.png binary
  32. *.jpg binary
  33. *.jpeg binary
  34. *.bmp binary
  35. *.pgm binary
  36. *.mp4 binary
  37. *.avi binary
  38. *.h264 binary
  39. *.onnx binary
  40. *.rknn binary
  41. *.engine binary
  42. *.plan binary
  43. *.pt binary
  44. *.calib binary
  45. *.docx binary
  46. *.xlsx binary
  47. *.pdf binary
  48. *.zip binary
  49. *.7z binary
  50. # 依赖锁文件/生成物不参与 diff 合并
  51. package-lock.json merge=binary