Skip to content

Commit 6d2c649

Browse files
author
Jegors Cemisovs
committed
Add .gitattributes file for consistent line endings and file handling
1 parent 4fd6e6a commit 6d2c649

File tree

1 file changed

+47
-0
lines changed

1 file changed

+47
-0
lines changed

.gitattributes

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# Default behavior:
2+
* text=auto eol=lf
3+
4+
# Python files
5+
*.py text eol=lf
6+
7+
# Configuration and text files
8+
*.toml text eol=lf
9+
*.ini text eol=lf
10+
*.cfg text eol=lf
11+
*.md text eol=lf
12+
*.txt text eol=lf
13+
*.json text eol=lf
14+
*.yml text eol=lf
15+
*.yaml text eol=lf
16+
.editorconfig text eol=lf
17+
.gitignore text eol=lf
18+
.gitattributes text eol=lf
19+
20+
# Lock files should be treated as text with LF endings
21+
uv.lock text eol=lf
22+
23+
# Make Jupyter Notebook diffs readable
24+
# Requires users to install nbdime (pip install nbdime)
25+
# and run `nbdime config-git --enable --global`
26+
*.ipynb diff=nbdime
27+
28+
# Mark binary files to prevent Git from trying to change their line endings
29+
# This prevents corruption of these files.
30+
*.png binary
31+
*.jpg binary
32+
*.jpeg binary
33+
*.gif binary
34+
*.ico binary
35+
*.pyc binary
36+
*.so binary
37+
*.sqlite3 binary
38+
*.db binary
39+
*.zip binary
40+
*.gz binary
41+
*.pdf binary
42+
43+
# Exclude specific files/directories from git archive (e.g., when downloading a zip)
44+
# This is great for providing students with a clean project download.
45+
/.github export-ignore
46+
/tests/ export-ignore
47+
/.pytest_cache/ export-ignore

0 commit comments

Comments
 (0)