Skip to content
This repository was archived by the owner on Dec 30, 2025. It is now read-only.

Commit 9f77f47

Browse files
committed
chore(gitattributes): enhance file handling and language detection
Expand the .gitattributes file to improve language detection, line ending normalization, and merge strategies. This change adds support for various file types, ensuring they are correctly identified and processed by Git and GitHub linguist. It also defines binary files, sets merge strategies for specific file types, and specifies files to be ignored during export. This enhancement aims to streamline development workflows, improve cross-platform compatibility, and ensure consistent handling of files across different environments.
1 parent 7d2b054 commit 9f77f47

File tree

1 file changed

+234
-1
lines changed

1 file changed

+234
-1
lines changed

.gitattributes

Lines changed: 234 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,235 @@
1+
# IRC.atl.chat .gitattributes
2+
# ============================
3+
4+
# Language Detection
5+
# ==================
6+
7+
# Docker and Compose files
18
*.yaml linguist-detectable
2-
*.yaml linguist-detectable
9+
*.yml linguist-detectable
10+
Dockerfile linguist-detectable
11+
Containerfile linguist-detectable
12+
13+
# Shell scripts
14+
*.sh linguist-detectable
15+
16+
# Configuration files
17+
*.conf linguist-detectable
18+
*.ini linguist-detectable
19+
*.template linguist-detectable
20+
21+
# Python files
22+
*.py linguist-detectable
23+
pyproject.toml linguist-detectable
24+
25+
# Documentation
26+
*.md linguist-detectable
27+
28+
# Text Processing
29+
# ===============
30+
31+
# Line ending normalization
32+
*.sh text eol=lf
33+
*.py text eol=lf
34+
*.yaml text eol=lf
35+
*.yml text eol=lf
36+
*.conf text eol=lf
37+
*.template text eol=lf
38+
*.md text eol=lf
39+
*.json text eol=lf
40+
*.toml text eol=lf
41+
*.ini text eol=lf
42+
43+
# Binary Files
44+
# ============
45+
46+
# Docker images and archives
47+
*.tar.gz binary
48+
*.tar.bz2 binary
49+
*.zip binary
50+
*.tar binary
51+
52+
# Certificates and keys
53+
*.pem binary
54+
*.crt binary
55+
*.key binary
56+
*.p12 binary
57+
*.pfx binary
58+
59+
# Database files
60+
*.db binary
61+
*.sqlite binary
62+
*.sqlite3 binary
63+
64+
# Log files
65+
*.log binary
66+
67+
# Images
68+
*.png binary
69+
*.jpg binary
70+
*.jpeg binary
71+
*.gif binary
72+
*.ico binary
73+
*.svg binary
74+
75+
# Archives
76+
*.tar binary
77+
*.gz binary
78+
*.bz2 binary
79+
*.xz binary
80+
81+
# Diff and Merge
82+
# ===============
83+
84+
# Configuration files - use union merge for conflicts
85+
*.conf merge=union
86+
*.template merge=union
87+
*.yaml merge=union
88+
*.yml merge=union
89+
90+
# Shell scripts - use ours merge (keep our version)
91+
*.sh merge=ours
92+
93+
# Documentation - use union merge
94+
*.md merge=union
95+
96+
# Generated Files
97+
# ===============
98+
99+
# Generated configuration files (should be ignored)
100+
src/backend/*/conf/*.conf linguist-generated
101+
src/backend/*/conf/*.conf merge=ours
102+
103+
# Lock files
104+
uv.lock linguist-generated
105+
package-lock.json linguist-generated
106+
yarn.lock linguist-generated
107+
108+
# Cache directories
109+
__pycache__/ linguist-vendored
110+
node_modules/ linguist-vendored
111+
.pytest_cache/ linguist-vendored
112+
113+
# Large Files
114+
# ===========
115+
116+
# Large configuration examples
117+
docs/examples/unrealircd/tls/curl-ca-bundle.crt linguist-vendored
118+
119+
# Documentation
120+
# =============
121+
122+
# Mark documentation as documentation
123+
README.md linguist-documentation
124+
docs/*.md linguist-documentation
125+
LICENSE linguist-documentation
126+
127+
# Vendor Detection
128+
# ================
129+
130+
# Third-party modules and examples
131+
docs/examples/ linguist-vendored
132+
src/backend/unrealircd/conf/examples/ linguist-vendored
133+
src/backend/unrealircd/conf/help/ linguist-vendored
134+
src/backend/unrealircd/conf/aliases/ linguist-vendored
135+
136+
# Test fixtures and data
137+
tests/fixtures/ linguist-vendored
138+
tests/legacy/ linguist-vendored
139+
140+
# Language Overrides
141+
# ==================
142+
143+
# Force specific languages for ambiguous files
144+
Makefile linguist-language=Makefile
145+
Dockerfile linguist-language=Dockerfile
146+
Containerfile linguist-language=Dockerfile
147+
compose.yaml linguist-language=YAML
148+
compose.yml linguist-language=YAML
149+
150+
# Configuration files
151+
*.conf linguist-language=INI
152+
*.template linguist-language=INI
153+
*.ini linguist-language=INI
154+
155+
# Shell scripts
156+
*.sh linguist-language=Shell
157+
158+
# Python files
159+
*.py linguist-language=Python
160+
pyproject.toml linguist-language=TOML
161+
162+
# Documentation
163+
*.md linguist-language=Markdown
164+
165+
# Git Attributes
166+
# ==============
167+
168+
# Ensure proper line endings for Windows compatibility
169+
*.sh text=auto eol=lf
170+
*.py text=auto eol=lf
171+
*.yaml text=auto eol=lf
172+
*.yml text=auto eol=lf
173+
*.conf text=auto eol=lf
174+
*.template text=auto eol=lf
175+
*.md text=auto eol=lf
176+
*.json text=auto eol=lf
177+
*.toml text=auto eol=lf
178+
*.ini text=auto eol=lf
179+
180+
# Binary files should not be processed
181+
*.tar.gz -text
182+
*.tar.bz2 -text
183+
*.zip -text
184+
*.tar -text
185+
*.pem -text
186+
*.crt -text
187+
*.key -text
188+
*.db -text
189+
*.sqlite -text
190+
*.sqlite3 -text
191+
*.log -text
192+
193+
# Export ignore for archives
194+
# ==========================
195+
196+
# Files to exclude from git archive
197+
.gitattributes export-ignore
198+
.gitignore export-ignore
199+
.gitmodules export-ignore
200+
201+
# Development files
202+
.env export-ignore
203+
cloudflare-credentials.ini export-ignore
204+
*.backup export-ignore
205+
*.tmp export-ignore
206+
207+
# IDE and editor files
208+
.vscode/ export-ignore
209+
.idea/ export-ignore
210+
*.swp export-ignore
211+
*.swo export-ignore
212+
*~ export-ignore
213+
214+
# OS generated files
215+
.DS_Store export-ignore
216+
Thumbs.db export-ignore
217+
desktop.ini export-ignore
218+
219+
# Python cache
220+
__pycache__/ export-ignore
221+
*.pyc export-ignore
222+
*.pyo export-ignore
223+
*.pyd export-ignore
224+
.Python export-ignore
225+
226+
# Test coverage
227+
.coverage export-ignore
228+
htmlcov/ export-ignore
229+
.pytest_cache/ export-ignore
230+
231+
# Logs and temporary files
232+
logs/ export-ignore
233+
*.log export-ignore
234+
tmp/ export-ignore
235+
temp/ export-ignore

0 commit comments

Comments
 (0)