-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.gitattributes
More file actions
62 lines (54 loc) · 1.95 KB
/
.gitattributes
File metadata and controls
62 lines (54 loc) · 1.95 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
# Enforce LF line endings on every checkout, regardless of the host OS.
#
# Problem this prevents:
# On Windows, git's default core.autocrlf=true converts LF -> CRLF on
# checkout. Bash then chokes on the trailing \r in shell scripts:
# scripts/install-mcp.sh: line 18: $'\r': command not found
# The same applies to Makefile (TABs collide with CRLF) and Dockerfile.
#
# Convention applied: explicit "text eol=lf" for everything that runs
# inside Linux containers / WSL / CI. Binaries are marked accordingly.
# This file is itself an Apache-licensed best-practice for any repo with
# both *nix and Windows contributors.
# Default: let Git auto-detect text vs binary; normalise text on commit.
* text=auto
# Shell scripts MUST be LF. Bash refuses to parse CRLF.
*.sh text eol=lf
*.bash text eol=lf
# Makefiles use TAB indentation; CRLF breaks recipes.
Makefile text eol=lf
*.mk text eol=lf
makefile text eol=lf
# Dockerfiles run in Linux containers.
Dockerfile text eol=lf
*.dockerfile text eol=lf
# Compose / config formats consumed by Linux tooling.
*.yml text eol=lf
*.yaml text eol=lf
*.toml text eol=lf
*.json text eol=lf
# Python sources -- harmless on Windows but consistent is better.
*.py text eol=lf
# Web assets stay LF too (Vite + ESLint expect it).
*.js text eol=lf
*.jsx text eol=lf
*.ts text eol=lf
*.tsx text eol=lf
*.css text eol=lf
*.html text eol=lf
# Common binaries -- mark explicitly so Git never mangles them.
*.png binary
*.jpg binary
*.jpeg binary
*.gif binary
*.ico binary
*.webp binary
*.pdf binary
*.zip binary
*.gz binary
*.tgz binary
*.tar binary
*.whl binary
*.so binary
*.dylib binary
*.dll binary