DeveloperFree to use

Runs in your browser. No file uploads for processing. Privacy details

Check .gitattributes Rules and Preview Overrides

See which root .gitattributes declarations apply to each file before you commit a change.

Loading tool...

How to test .gitattributes patterns

  1. Paste the root .gitattributes

    Add the root rules you want to test. No Git repository or working files are required.

  2. Enter paths like Git sees them

    For example, use src/run.sh and assets/logo.png, one relative file path per line. Use forward slashes. Quote a pattern that contains a space in the rules.

  3. Review the winning value for each attribute

    A rule assigning text and eol on one line can be followed by a matching rule that resets only eol. The report gives the source line for each result.

Use cases

  • Review text/binary or LF/CRLF conventions before committing.
  • Check whether a file declares an LFS filter or another custom attribute.

Limits and privacy

  • Runs a bounded root-only file-path preview: 12 KiB per input, 80 rule or macro lines, 64 names and 50 file paths.
  • Does not read nested files, Git index, info/attributes, system or global configuration, Git-provided computed attributes, or the actual contents of a file.
  • The report shows declared attributes only. It does not normalize files, run LFS or other filters, or predict behavior affected by Git configuration.

The tool processes inputs in your browser. File processing and site analytics are separate.

Frequently asked questions

Will this tell me which files Git ignores?

No. Use Gitignore Rule Explainer for ignored and excluded paths. The attribute preview is for declarations such as text, eol and filter.

What are the four Git attribute states?

Set, unset, a string value, and unspecified. A later !name declaration can explicitly reset that attribute without clearing other attributes.

Does a directory pattern apply to its contents?

Unlike an ignore rule, a .gitattributes path ending in a slash does not apply to files inside. Use a path followed by /** to declare attributes for descendants.

Can I compare this preview with Git?

Yes. Run git check-attr with the attributes and paths you want to compare. Git may also read rules outside the supplied root .gitattributes, which this tool does not see.

Related tools