-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.gitattributes
More file actions
78 lines (53 loc) · 2.26 KB
/
.gitattributes
File metadata and controls
78 lines (53 loc) · 2.26 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
# ============================================================
# .gitattributes (Keep files consistent across operating systems)
# ============================================================
# REQ.UNIVERSAL: All professional GitHub project repositories MUST include .gitattributes.
# WHY: Ensure consistent line endings, diff behavior, and file classification
# across Windows, macOS, and Linux environments.
# ALT: Repository may omit .gitattributes ONLY if equivalent normalization is
# enforced reliably by tooling and CI (rare and fragile).
# CUSTOM: Update file-type rules only when introducing new languages,
# binary artifacts, or documentation formats.
# NOTE: Rules are ordered by impact and generality, not alphabetically.
# Git attributes are documented at https://git-scm.com/docs/gitattributes
# === Core defaults (always apply) ===
# WHY: Auto-detect text files and normalize line endings to avoid cross-platform drift.
* text=auto
# === Programming languages and scripts ===
# WHY: Python and shell scripts must use LF for CI/CD, Linux environments, and containers.
*.py text eol=lf
*.sh text eol=lf
# WHY: PowerShell convention on Windows uses CRLF.
*.ps1 text eol=crlf
# === Markup and documentation ===
# WHY: Documentation and markup files use LF; standard for cross-platform tooling.
*.md text eol=lf
# === Configuration and structured text ===
# WHY: Configuration and structured text formats use LF for stable diffs.
*.json text eol=lf
*.jsonc text eol=lf
*.jsonl text eol=lf
*.toml text eol=lf
*.yaml text eol=lf
*.yml text eol=lf
# === Databases (binary) ===
# WHY: Database files are binary; prevent text normalization and meaningless diffs.
*.db binary
*.sqlite binary
*.sqlite3 binary
# === Compressed artifacts (binary) ===
# WHY: Compressed artifacts are binary; prevent text normalization.
*.gz binary
*.tar binary
*.tgz binary
*.zip binary
*.7z binary
# === Log files (binary) ===
# WHY: Log files are typically large; prevent text normalization.
*.log binary
project.log binary
# === GitHub metadata and UI ===
# WHY: Exclude documentation and tests from GitHub language statistics.
docs/** linguist-documentation
tests/** linguist-documentation
evaluation/** linguist-documentation