Skip to content

Commit 864f667

Browse files
Add .gitattributes to enforce LF line endings
- Set default text handling to auto-normalize line endings - Explicitly enforce LF line endings for Python files - Add LF enforcement for other text files (md, yml, sql, css, etc.) - Mark binary files appropriately - Fixes #1062 Signed-off-by: Sukuna0007Abhi <[email protected]>
1 parent 59c7c5a commit 864f667

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

.gitattributes

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Set default behavior to automatically normalize line endings
2+
* text=auto
3+
4+
# Explicitly declare text files you want to always be normalized and converted
5+
# to native line endings on checkout
6+
*.py text eol=lf
7+
*.md text eol=lf
8+
*.yml text eol=lf
9+
*.yaml text eol=lf
10+
*.json text eol=lf
11+
*.txt text eol=lf
12+
*.sh text eol=lf
13+
*.sql text eol=lf
14+
*.css text eol=lf
15+
16+
# Configuration files
17+
*.conf text eol=lf
18+
.gitignore text eol=lf
19+
.gitattributes text eol=lf
20+
pyproject.toml text eol=lf
21+
docker-compose.yml text eol=lf
22+
23+
# Dockerfile should always use LF
24+
Dockerfile text eol=lf
25+
*.Dockerfile text eol=lf
26+
27+
# Denote all files that are truly binary and should not be modified
28+
*.png binary
29+
*.jpg binary
30+
*.jpeg binary
31+
*.gif binary
32+
*.ico binary
33+
*.pdf binary

0 commit comments

Comments
 (0)