-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.gitattributes
More file actions
21 lines (19 loc) · 1.12 KB
/
Copy path.gitattributes
File metadata and controls
21 lines (19 loc) · 1.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# ⚠️ Line endings are enforced by git, not by anyone remembering.
# Source: a "probe and restore" git operation once rewrote the line endings of an entire
# working tree, including batch files the user was actively running — and cmd.exe is
# unreliable with LF-only batch files.
# 🔴 **Default: every text file is stored LF in the repository and checked out LF.**
# ⚠️ Without this line, extensions not listed below (`.txt` / `.json` / `LICENSE` / this file
# itself…) fall back to git's default, so a Windows user sees a wall of
# "LF will be replaced by CRLF" warnings on every `git status` —
# **and the practical effect of too many warnings is that nobody reads warnings.**
* text=auto eol=lf
*.bat text eol=crlf
*.sh text eol=lf
# ⚠️ macOS double-click buttons. **Line endings must be LF** — a CRLF file gives the
# `#!/bin/bash` line a trailing \r, so the system cannot find the interpreter,
# and the error message says nothing about line endings.
*.command text eol=lf
*.py text eol=lf
*.md text eol=lf
# ⚠️ **`.bat` is the only exception; ⛔ it must be CRLF** — see the note above.