Skip to content

Commit b16acbd

Browse files
tablackburnclaude
andcommitted
chore: pin line endings to LF via .gitattributes
The repo already stores every text file as LF in the index, but Windows clones with global core.autocrlf=true rewrite the working tree to CRLF on checkout. Subsequent edits made through tooling that writes LF (most editors and AI agents do) trigger 'LF will be replaced by CRLF the next time Git touches it' warnings on every commit. Pinning eol=lf in .gitattributes overrides the contributor's global autocrlf setting for this repo and silences the warning. PowerShell on Windows handles LF fine, and the devcontainer already runs Linux. NOTE: GitHub template repos are one-time copies at creation, so this fix does NOT propagate to repositories already created from this template. Existing downstream repos must apply the same .gitattributes change separately. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent da1b765 commit b16acbd

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

.gitattributes

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,10 @@
1+
# Normalize line endings to LF in both the repo and the working tree, regardless of
2+
# the contributor's global core.autocrlf setting. PowerShell on Windows handles LF
3+
# fine, and the devcontainer runs Linux. Without this, Windows clones with
4+
# core.autocrlf=true emit "LF will be replaced by CRLF the next time Git touches it"
5+
# warnings on every commit when files are edited by tooling that writes LF (most
6+
# editors and AI agents do).
7+
* text=auto eol=lf
8+
19
# The docs are generated by the build script and should be considered artifacts
210
docs/en-US/* linguist-generated

0 commit comments

Comments
 (0)