Skip to content

Commit 793baa4

Browse files
committed
Add .gitattributes for consistent line ending handling
Ensures Python files and shell scripts always use LF line endings, preventing issues when contributors work on Windows. This addresses problems from oss-aspen#1061 where CRLF line endings caused failures. Fixes oss-aspen#1062
1 parent 59c7c5a commit 793baa4

1 file changed

Lines changed: 42 additions & 0 deletions

File tree

.gitattributes

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Set default behavior to automatically normalize line endings
2+
* text=auto
3+
4+
# Python files should always use LF line endings
5+
*.py text eol=lf
6+
7+
# Shell scripts should always use LF line endings
8+
*.sh text eol=lf
9+
10+
# Batch files should use CRLF (Windows)
11+
*.bat text eol=crlf
12+
*.cmd text eol=crlf
13+
14+
# Configuration files that may be used in containers/Linux
15+
Dockerfile text eol=lf
16+
docker-compose*.yml text eol=lf
17+
*.yaml text eol=lf
18+
*.yml text eol=lf
19+
Makefile text eol=lf
20+
21+
# Explicitly declare text files to avoid ambiguity
22+
*.md text
23+
*.txt text
24+
*.json text
25+
*.toml text
26+
*.cfg text
27+
*.ini text
28+
*.html text
29+
*.css text
30+
*.js text
31+
32+
# Binary files - do not modify
33+
*.png binary
34+
*.jpg binary
35+
*.jpeg binary
36+
*.gif binary
37+
*.ico binary
38+
*.pdf binary
39+
*.woff binary
40+
*.woff2 binary
41+
*.ttf binary
42+
*.eot binary

0 commit comments

Comments
 (0)