Repository attribute evidence

.gitattributes Pattern, EOL & Archive Attribute Simulator

Find the winning assignment for every attribute, follow nested files and macros, and see why a file’s EOL policy or archive inclusion differs from what a pattern appears to promise.

1. Supply an attribute snapshot

A plain file becomes the root .gitattributes. Bundles use the @@ headers below.
One repository-relative path per line.
Reads .gitattributes text and inventories filenames. Folder contents may include untracked files.

For a tracked inventory, paste the output of git ls-files. Use attribute files from the snapshot you intend to inspect.

Start each file with @@ .gitattributes, @@ src/.gitattributes, or @@ .git/info/attributes. Optional @@ $global and @@ $system blocks supply external defaults. Plain text without a header is a root file.

Case-sensitive, forward-slash relative paths. A trailing slash declares a directory. Ancestor directories are inferred for archive checks. Spaces are preserved; control-character filenames and .git entries are excluded.

2. EOL assumptions

Supported syntax and simulation scope

This bounded simulator supports common Git attribute syntax: Set, Unset, string values, explicit Unspecified resets, nested precedence, the built-in binary macro, and top-level user macros. Patterns include *, ?, **, escaped literals, ranges, negated character classes, ASCII POSIX classes, and C-style quoted UTF-8 patterns with three-digit octal escapes. Matching uses UTF-8 bytes, so ? consumes one byte. An invalid line is inventoried and skipped as a whole; arbitrary inline # comments are invalid.

Supply one coherent virtual snapshot. The simulator does not read your Git configuration, index, commits, symbolic links, attribute-source settings, or file content. No filters, diff/merge drivers, LFS downloads, re-encoding, or Git commands execute. EOL output is a policy explanation, with text=auto marked conditional. Archive output assumes every inventoried path belongs to the intended tree; it does not generate archive bytes or expand export-subst placeholders.

Limits: 1,000,000 characters per input, 100 attribute files, 2,000 rules/definitions, 3,000 inventoried paths, 6,000 total nodes including inferred directories, 64 distinct attributes, 8,192 characters and 128 assignments per rule line, 4,096 characters per path, 3,000,000 comparisons, and 30,000,000 matching/expansion steps. A cancellable Web Worker handles the simulation. UTF-8 text with LF/CRLF and an optional BOM is supported. Common behavior is regression-tested against Git 2.50.1; newer builtin_* attributes are not simulated.

File names, attribute text, and reports stay in this browser. Nothing is uploaded or saved.

Why the winner can differ by attribute

Matching rules override each attribute independently. A later eol assignment can replace eol while retaining an earlier filter or diff assignment. Nested files take priority over their parents, and info/attributes can override the work-tree policy. Macros expand only when their effective invocation is Set. Consult the Git attributes reference and pattern syntax reference.

Verify against the intended Git snapshot

Use git check-attr -a -- path/to/file for the installed client’s effective assignments. Use git ls-files --eol to inspect actual index and work-tree line endings. Review Git archive’s attribute-source rules and inspect a locally generated archive for the intended commit. Driver configuration and content conversion require local verification.

Frequently asked questions

Why is an Unset child still excluded from an archive?

Archive traversal first checks parent directories. When a parent is excluded, traversal never reaches that child. Its file-level export-ignore state can still be Unset; the directory exclusion governs inclusion.

Does text=auto mean a file is definitely converted?

It declares automatic detection. File bytes and existing index line endings can affect the outcome, so this simulator reports a conditional policy rather than inventing the actual content result.

Can I test Git LFS filters or custom merge drivers?

You can trace filter, diff, and merge attribute names and driver values. This tool does not run the driver, read its configuration, fetch objects, or predict its output.

Browse developer tools · Systems tools · All ToolQuill tools