-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.gitattributes
More file actions
209 lines (161 loc) · 4.79 KB
/
Copy path.gitattributes
File metadata and controls
209 lines (161 loc) · 4.79 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
# ============================================================
# .gitattributes (ALL-REPOS)
# ============================================================
# Updated: 2026-09-25
#
# REQ: All professional GitHub repositories SHOULD include .gitattributes.
# WHY: Keep line endings, diffs, merges, and file classification consistent
# across Windows, macOS, Linux, GitHub Actions, and other environments.
# CUSTOM: Add repository-specific rules when files require different handling.
# Git attributes: https://git-scm.com/docs/gitattributes
# === Core defaults ===
# WHY: Auto-detect text files and normalize text to LF unless a later rule
# is more specific.
* text=auto eol=lf
# === Named root and metadata files ===
# WHY: Important repository metadata files are text and should use LF.
.gitattributes text eol=lf
.gitignore text eol=lf
.editorconfig text eol=lf
.python-version text eol=lf
CODEOWNERS text eol=lf
LICENSE text eol=lf
uv.lock text eol=lf
# === Operating-system files ===
# WHY: OS metadata files are binary/noisy and should not be normalized or diffed.
.DS_Store binary
Thumbs.db binary
desktop.ini binary
# === Markup and documentation ===
# WHY: Documentation, web, and math markup use LF for stable cross-platform diffs.
*.bib text eol=lf
*.cff text eol=lf
*.cls text eol=lf
*.css text eol=lf
*.html text eol=lf
*.md text eol=lf
*.qmd text eol=lf
*.rst text eol=lf
*.sty text eol=lf
*.tex text eol=lf
*.typ text eol=lf
*.xml text eol=lf
# === Configuration and structured text ===
# WHY: Configuration and structured text files should produce stable diffs.
*.cfg text eol=lf
*.env text eol=lf
*.ini text eol=lf
*.json text eol=lf
*.jsonc text eol=lf
*.jsonl text eol=lf
*.ndjson text eol=lf
*.toml text eol=lf
*.txt text eol=lf
*.yaml text eol=lf
*.yml text eol=lf
# === Programming languages and scripts ===
# WHY: Source and script files use LF for CI, shells, containers, and tooling.
*.c text eol=lf
*.cpp text eol=lf
*.cs text eol=lf
*.go text eol=lf
*.h text eol=lf
*.hpp text eol=lf
*.java text eol=lf
*.jl text eol=lf
*.js text eol=lf
*.jsx text eol=lf
*.mjs text eol=lf
*.cjs text eol=lf
*.mojo text eol=lf
*.ps1 text eol=lf
*.py text eol=lf
*.pyi text eol=lf
*.r text eol=lf
*.R text eol=lf
*.rs text eol=lf
*.sh text eol=lf
*.sql text eol=lf
*.ts text eol=lf
*.tsx text eol=lf
# WHY: Windows batch scripts conventionally use CRLF and may be consumed by
# Windows tooling that expects Windows-style line endings.
*.bat text eol=crlf
*.cmd text eol=crlf
# === Formal, math, and proof languages ===
# WHY: Lean source files are text; Lean build artifacts are binary.
*.ilean binary
*.lean text eol=lf
*.olean binary
*.trace binary
# WHY: Lake build output should not be normalized if accidentally tracked.
.lake/** binary
# === Notebooks ===
# WHY: Jupyter notebooks are JSON-based text files and benefit from stable
# cross-platform line endings.
*.ipynb text eol=lf
# === Text and tabular data ===
# WHY: Small text data files benefit from readable diffs.
*.csv text eol=lf
*.dat text eol=lf
*.psv text eol=lf
*.tsv text eol=lf
# === Images and web binary assets ===
# WHY: Image and compiled web asset formats are binary; text diffs are not meaningful.
*.avif binary
*.bmp binary
*.gif binary
*.ico binary
*.jpeg binary
*.jpg binary
*.png binary
*.webp binary
*.wasm binary
# WHY: SVG is XML-based text and benefits from readable diffs.
*.svg text eol=lf
# === Databases ===
# WHY: Database files are binary; text diffs are not meaningful.
*.db binary
*.duckdb binary
*.sqlite binary
*.sqlite3 binary
# === Columnar and analytical data ===
# WHY: Columnar and analytical formats are binary; text diffs are not meaningful.
*.arrow binary
*.avro binary
*.feather binary
*.orc binary
*.parquet binary
# === Office, BI, PDF, and compressed artifacts ===
# WHY: Office, BI, PDF, and archive files are binary.
*.7z binary
*.bz2 binary
*.doc binary
*.docx binary
*.gz binary
*.odp binary
*.ods binary
*.odt binary
*.pbix binary
*.pbit binary
*.pdf binary
*.ppt binary
*.pptx binary
*.rar binary
*.tar binary
*.tgz binary
*.xls binary
*.xlsm binary
*.xlsx binary
*.xz binary
*.zip binary
# === Logs and generated runtime output ===
# WHY: Logs are text when intentionally committed and should remain readable
# and diffable.
# NOTE: Most logs are ignored by .gitignore. Repository-specific research
# evidence may override text normalization with -text when exact bytes matter.
*.log text eol=lf
# === GitHub metadata and UI ===
# WHY: Exclude documentation and tests from GitHub language statistics.
docs/** linguist-documentation
tests/** linguist-documentation