Skip to content

Commit fc65d72

Browse files
AurelioloCopilot
andauthored
chore: add text=auto catch-all to .gitattributes (#1051)
Adds `* text=auto` as the first line of `.gitattributes` to normalize all text files to LF in the repo and OS-native line endings on checkout. This silences the CRLF conversion warnings on Windows (e.g. `warning: LF will be replaced by CRLF the next time Git touches it`) for files not already covered by the existing `eol=lf`/`eol=crlf` overrides. ## Changes - Add `* text=auto` catch-all rule before the existing Go/shell/Docker/PowerShell overrides - Existing `eol=lf` and `eol=crlf` overrides continue to take precedence ## Test plan - Verified `git add -A && git diff --staged --stat` no longer produces CRLF warnings for `.md` and other text files on Windows --------- Signed-off-by: Aurelio <19254254+Aureliolo@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 55f5206 commit fc65d72

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

.gitattributes

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# Normalize all text files to LF in the repo; checkout line endings depend on Git config.
2+
# Silences CRLF conversion warnings on Windows.
3+
* text=auto
4+
15
# Go tooling (gofmt, golangci-lint) requires LF line endings.
26
# Without this, core.autocrlf=true on Windows converts to CRLF on checkout,
37
# causing spurious "not properly formatted" errors -- especially in worktrees.

0 commit comments

Comments
 (0)