Skip to content

Commit e57da86

Browse files
matthttamclaude
andauthored
chore: add .gitattributes to normalize line endings to LF (#5)
Without an explicit policy, Windows contributors see "LF will be replaced by CRLF the next time Git touches it" warnings on every commit. Force LF everywhere (working tree + repo) and mark common binary asset types so git never tries to diff or normalize them. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent e490ca2 commit e57da86

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

.gitattributes

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Treat all files as text by default and normalize line endings to LF
2+
# in both the repository and the working tree. This stops Windows
3+
# contributors from seeing the "LF will be replaced by CRLF" warning
4+
# when staging files written with CRLF by an editor.
5+
* text=auto eol=lf
6+
7+
# Mark common binary asset types so git never tries to diff/normalize them.
8+
*.png binary
9+
*.jpg binary
10+
*.jpeg binary
11+
*.gif binary
12+
*.webp binary
13+
*.ico binary
14+
*.woff binary
15+
*.woff2 binary
16+
*.ttf binary
17+
*.eot binary
18+
*.otf binary
19+
*.zip binary
20+
*.pdf binary

0 commit comments

Comments
 (0)