-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.gitattributes
More file actions
170 lines (126 loc) · 3.76 KB
/
Copy path.gitattributes
File metadata and controls
170 lines (126 loc) · 3.76 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
# ============================================================
# .gitattributes (ALL-REPOS)
# ============================================================
# Updated: 2026-06-27
#
# REQ: All professional GitHub repositories SHOULD include .gitattributes.
# WHY: Keep line endings, diffs, and file classification consistent across
# Windows, macOS, Linux, GitHub Actions, and environments.
# CUSTOM: Add rules when new shared file types are introduced.
# Git attributes: https://git-scm.com/docs/gitattributes
# === Core defaults ===
# WHY: Auto-detect text files and normalize text
# unless a later rule is more specific.
* text=auto eol=lf
# === Named root and metadata files ===
# WHY: Important extensionless repo files are text and should use LF.
CODEOWNERS text eol=lf
LICENSE text eol=lf
# === Operating-system files ===
# WHY: OS metadata files are binary/noisy and should not be normalized.
.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
*.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
*.xml text eol=lf
# === Configuration and structured text ===
# WHY: Config 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: Windows specific script types (.bat, .cmd)
# are covered under the general LF text policy.
# 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
*.mojo text eol=lf
*.ps1 text eol=lf
*.py 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
# === 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 can contain Python, R, Julia, and other kernels.
*.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
# === 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/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
*.docx binary
*.gz binary
*.pbix binary
*.pbit binary
*.pdf 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 generated runtime evidence; avoid normalization churn.
*.log binary
project.log binary
# === GitHub metadata and UI ===
# WHY: Exclude documentation and tests from GitHub language statistics.
docs/** linguist-documentation
tests/** linguist-documentation