Add .gitattributes to enforce LF line endings

Prevents CRLF contamination from Windows-origin files.
All text files normalized to LF; binary extensions excluded.
This commit is contained in:
Ryan Malloy 2026-02-20 10:55:29 -07:00
parent 29df688f28
commit 696d2dd387

36
.gitattributes vendored Normal file
View File

@ -0,0 +1,36 @@
# Normalize line endings to LF on commit
* text=auto eol=lf
# Force LF for all source files (prevents CRLF contamination)
*.py text eol=lf
*.c text eol=lf
*.h text eol=lf
*.js text eol=lf
*.mjs text eol=lf
*.ts text eol=lf
*.json text eol=lf
*.md text eol=lf
*.mdx text eol=lf
*.yml text eol=lf
*.yaml text eol=lf
*.toml text eol=lf
*.cfg text eol=lf
*.txt text eol=lf
*.css text eol=lf
*.astro text eol=lf
*.html text eol=lf
*.svg text eol=lf
Makefile text eol=lf
Dockerfile text eol=lf
*.sh text eol=lf
# Binary files — leave as-is
*.bin binary
*.ihx binary
*.hex binary
*.png binary
*.jpg binary
*.gif binary
*.ico binary
*.woff binary
*.woff2 binary