Skip to content
Novus Examples
gitattributes

What is a .gitattributes file?

text/plain

A .gitattributes file assigns per-path attributes that change how Git handles matching files. It controls end-of-line normalisation (`text`, `-text`, `eol=lf`), diff and merge drivers, export filtering, `linguist-*` language hints, and Git LFS filters, using the same pattern syntax as .gitignore with attributes listed after each pattern.

How to use a .gitattributes file

Use an example .gitattributes file to test attribute parsers and repository-tooling that has to honour line-ending or diff-driver rules, verifying that binary paths are excluded from text normalisation and that later patterns override earlier ones.

Convert a .gitattributes file to another format

← All file formats