Boneyard Tools

Gitattributes Generator

Build a .gitattributes file without memorizing the syntax. Toggle line-ending normalization, list the extensions Git LFS should track, and add vendored or export-ignore paths. The file rebuilds as you type, then copy it or download it as .gitattributes for your repo root.

How to generate a .gitattributes

  1. Leave 'Normalize line endings (* text=auto)' checked to let Git manage CRLF and LF, or uncheck it to omit that line.
  2. In 'Git LFS extensions', list the file types to store in Git LFS, one per line or comma separated (a leading dot is optional).
  3. In 'Linguist vendored paths', add globs or folders GitHub should exclude from language stats.
  4. In 'Export-ignore paths', add anything to leave out of git archive tarballs, such as tests/ and .github/.
  5. Review the generated .gitattributes preview, then click Copy or Download to save it in the root of your repository.

Examples

Full file from the default inputs

normalize on; LFS: psd, zip, mov; vendored: vendor/**; export: tests/, .github/
* text=auto

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

vendor/** linguist-vendored

tests/ export-ignore
.github/ export-ignore

LFS only, leading dot optional

normalize off; LFS: psd, .zip
*.psd filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text

Vendored and export-ignore paths

vendored: vendor/**, third_party/; export: tests/
vendor/** linguist-vendored
third_party/ linguist-vendored

tests/ export-ignore

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. It is the single most common .gitattributes line for cross-platform teams.

What exactly does the Git LFS section write?

For each extension it emits one line of the form '*.ext filter=lfs diff=lfs merge=lfs -text', for example '*.psd filter=lfs diff=lfs merge=lfs -text'. That is the same attribute set 'git lfs track' would add for that pattern.

Does generating the file install Git LFS for me?

No. This tool only writes the text. You still need Git LFS installed (run 'git lfs install' once), then commit the .gitattributes so teammates pick up the same tracking rules.

Do I type extensions with or without a dot?

Either works. 'psd' and '.psd' both become '*.psd'. Entries that already contain a '*' or a '/' are treated as globs or paths and passed through unchanged, so 'vendor/**' stays as written.

Can I separate entries by commas or new lines?

Both. Each of the three text boxes splits on commas and new lines, so a list like 'psd, zip' and a stacked list on separate lines produce the same result. Blank entries are ignored.

What is linguist-vendored for?

It marks paths as vendored so GitHub's Linguist leaves them out of your repository's language breakdown. It is useful for bundled third-party libraries that would otherwise skew the stats.

When should I use export-ignore?

Paths marked export-ignore are excluded from archives made with 'git archive', such as release tarballs. Common picks are tests/, CI config like .github/ and other files that do not need to ship.

Are duplicates and ordering handled?

Identical entries in a box are dropped while original order is kept. Sections always appear in a fixed order (text=auto, then LFS, vendored, export-ignore), each separated by a blank line, and the file ends with a trailing newline.

Is my configuration private?

Yes. The file is built entirely in your browser as you type and nothing is uploaded to any server.

Learn more

Related tools