Gitattributes generator
Build a .gitattributes file for line endings, binary files, Git LFS and more.
Gitattributes generator
A .gitattributes file tells Git how to treat specific paths — whether to normalize line endings, treat a file as binary, route it through Git LFS, or hand it a language-aware diff driver. Getting it wrong is how a Windows checkout ends up with a diff on every line, or a Photoshop file compared as if it were plain text. This tool builds the file from tested rule groups, not a copied gist.
Line-ending normalization adds the baseline text=auto rule plus LF and CRLF overrides for shell scripts and Windows batch files. Binary files marks image, font and executable extensions so Git never diffs or merges them as text. Git LFS rules route large design and media formats through Git's large-file storage. Diff drivers add readable diff headers for CSS, HTML, Java, Python, Go and Rust. Merge strategies mark lock files as binary and files such as CHANGELOG.md as union-mergeable. Linguist attributes hint at generated, vendored and documentation paths so they stop counting toward a repository's language stats on GitHub. A project preset — web, Node, Python, Unity or documentation — adds one section tuned to that stack.
Every rule group is independent, so you can combine binary handling, Git LFS and a language preset in one pass. "Merge sections without duplicate rules" drops a line a preset and a chosen group both add, so a lock file never gets two conflicting merge rules; a section left with no lines is dropped, not printed empty. Sorting keeps each section's rules in a predictable order, easier to review as the file grows.
Everything runs in your browser: no repository path or project name is ever sent anywhere. Copy the result into your .gitattributes, download it as a .txt file, or send it back to the input to keep layering on rule groups.