chore: add .gitattributes to normalize line endings to LF
Prevents cross-platform CRLF/LF churn between Windows and macOS checkouts. Windows-only scripts (bat/cmd/ps1) pinned to CRLF; shell scripts pinned to LF. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
30
.gitattributes
vendored
Normal file
30
.gitattributes
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
# Normalize line endings on commit; check out LF on every OS.
|
||||
* text=auto eol=lf
|
||||
|
||||
# Binary files — never touch line endings.
|
||||
*.png binary
|
||||
*.jpg binary
|
||||
*.jpeg binary
|
||||
*.gif binary
|
||||
*.ico binary
|
||||
*.webp binary
|
||||
*.pdf binary
|
||||
*.zip binary
|
||||
*.gz binary
|
||||
*.tar binary
|
||||
*.woff binary
|
||||
*.woff2 binary
|
||||
*.ttf binary
|
||||
*.otf binary
|
||||
*.eot binary
|
||||
*.mp4 binary
|
||||
*.mov binary
|
||||
*.wasm binary
|
||||
|
||||
# Shell scripts must stay LF regardless.
|
||||
*.sh text eol=lf
|
||||
|
||||
# Windows batch / PowerShell must stay CRLF.
|
||||
*.bat text eol=crlf
|
||||
*.cmd text eol=crlf
|
||||
*.ps1 text eol=crlf
|
||||
Reference in New Issue
Block a user