Boneyard Tools

Gitattributes Generator

Set line-ending normalization, choose which file types Git LFS should track, mark vendored paths and add export-ignore rules, then copy a ready .gitattributes.

How to generate a .gitattributes

  1. Turn on line-ending normalization if you want Git to handle CRLF and LF automatically.
  2. List the extensions Git LFS should track, plus any vendored or export-ignored paths.
  3. Copy the generated .gitattributes into the root of your repository.

Examples

Normalize plus LFS for design files

normalizeEol: true, lfs: psd, zip
* text=auto

*.psd filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text

Frequently asked questions

What does * text=auto do?

It lets Git decide which files are text and normalize their line endings to LF in the repository, while checking them out with your platform's native endings.

How does the Git LFS section work?

For each extension you list, the tool writes a line with filter, diff and merge set to lfs and -text, which is exactly what git lfs track adds for that pattern.

What is linguist-vendored for?

It marks paths as vendored so GitHub's Linguist excludes them from your repository's language statistics. It is handy for bundled third-party code.

When should I use export-ignore?

Paths marked export-ignore are left out of archives created by git archive, such as release tarballs. Use it for tests, CI config and other non-shipping files.

Is my configuration private?

Yes. The file is built entirely in your browser and nothing is uploaded.

Related tools