|
1 | | -# Set default behavior to automatically normalize line endings |
2 | | -* text=auto |
3 | | - |
4 | | -# Explicitly declare files that should use LF |
5 | | -*.sh text eol=lf |
6 | | -Makefile text eol=lf |
7 | | -*.mk text eol=lf |
8 | | - |
9 | | -# Denote all files that are truly binary and should not be modified |
10 | | -*.png binary |
11 | | -*.jpg binary |
12 | | -*.gif binary |
13 | | -*.ico binary |
14 | | -*.zip binary |
15 | | -*.pdf binary |
| 1 | +# Default: Auto-detect text files and normalize line endings to LF |
| 2 | +* text=auto eol=lf |
| 3 | + |
| 4 | +# Python source files: Enforce UTF‑8 encoding and enable Python-aware diffs |
| 5 | +*.py text diff=python encoding=utf-8 |
| 6 | +*.pyi text diff=python encoding=utf-8 |
| 7 | +*.pyw text diff=python encoding=utf-8 |
| 8 | + |
| 9 | +# Python project configuration files: Consistent UTF‑8 encoding |
| 10 | +*.toml text encoding=utf-8 |
| 11 | +pyproject.toml text encoding=utf-8 |
| 12 | +requirements*.txt text encoding=utf-8 |
| 13 | +.pre-commit-config.yaml text encoding=utf-8 |
| 14 | + |
| 15 | +# Documentation, configuration, and data files: Uniform encoding and enhanced diffs for Markdown |
| 16 | +*.md text encoding=utf-8 diff=markdown |
| 17 | +*.rst text encoding=utf-8 |
| 18 | +*.json text encoding=utf-8 |
| 19 | +*.yaml text encoding=utf-8 |
| 20 | +*.yml text encoding=utf-8 |
| 21 | +*.ini text encoding=utf-8 |
| 22 | +*.cfg text encoding=utf-8 |
| 23 | + |
| 24 | +# Explicitly declare files that should use LF line endings (scripts and makefiles) |
| 25 | +*.sh text eol=lf |
| 26 | +Makefile text eol=lf |
| 27 | +*.mk text eol=lf |
| 28 | + |
| 29 | +# Jupyter Notebooks: Ensure UTF‑8 encoding for proper text processing |
| 30 | +*.ipynb text encoding=utf-8 |
| 31 | + |
| 32 | +# Cython source files: Enable proper diffing with enforced UTF‑8 encoding |
| 33 | +*.pyx text diff=python encoding=utf-8 |
| 34 | + |
| 35 | +# Scalable Vector Graphics: Enforce UTF‑8 encoding and enable XML-aware diffs |
| 36 | +*.svg text encoding=utf-8 diff=xml |
| 37 | + |
| 38 | +# Additional text files: Enforce LF and UTF‑8 for plain text files |
| 39 | +*.txt text eol=lf working-tree-encoding=utf-8 |
| 40 | + |
| 41 | +# Binary and compiled files: Prevent alterations by marking as binary |
| 42 | +*.db binary |
| 43 | +*.p binary |
| 44 | +*.pkl binary |
| 45 | +*.pickle binary |
| 46 | +*.pyc binary |
| 47 | +*.pyd binary |
| 48 | +*.pyo binary |
| 49 | +*.png binary |
| 50 | +*.jpg binary |
| 51 | +*.gif binary |
| 52 | +*.ico binary |
| 53 | +*.zip binary |
| 54 | +*.pdf binary |
| 55 | + |
| 56 | +# Exclude Git-specific files from exports |
| 57 | +.gitattributes export-ignore |
| 58 | +.gitignore export-ignore |
0 commit comments