Skip to content

.gitattributes

Browse Docs pages

Documentation for .gitattributes. This file was auto-generated by the Document Improvement Project (DIP).

Overview

.gitattributes pins * text=auto eol=lf so every text file checks out with LF endings on every platform โ€” including git clients that default to autocrlf (Git for Windows), where CRLF checkouts break the byte-exact golden compares and leak carriage returns into rendered HTML.

Usage

This file has no command-line interface.

Reads and writes

This file is not a script; no script environment contract applies.

History

No matching entries in CHANGELOG.md.

Notes

Design

The file contains the single rule * text=auto eol=lf. It forces every text file to check out with LF line endings on every platform, including git clients that default to autocrlf (Git for Windows).

Limits

The rule affects checkout line endings only. It does not change blob content for files already committed with LF endings, and it does not mark binary files, which Git detects separately.

Cautions

Do not weaken it to a narrower pathspec. Renders emit LF, golden fixtures are compared byte-for-byte with cmp, and embedded CR leaks into generated HTML, so a mixed-ending checkout fails the golden regression and injects stray carriage returns into output pages.