Fidument Tools · Beta version

Which rule excludes a path in my repository?

Test a list of paths against a root .gitignore and identify the rules excluding files.

Which rule excludes a path in my repository?

How to use this tool

  1. Prepare the paths

    Save one repository-relative path per line in a UTF-8 text file. Use forward slashes and end directory paths with a slash.

  2. Select the rules

    Open the path list and the repository's root .gitignore.

  3. Read the report

    Choose Run and download gitignore-report.json. For an excluded path, check the matching pattern and rule number.

Parent folders and negation

Before using a rule starting with ! to restore a path, check whether any of its parent directories is already excluded.

Who is it for?

  • Developers and maintainers reviewing Git rules

Input

  • UTF-8 path list and root .gitignore

Output

  • gitignore-report.json

Capabilities

  • Save one repository-relative path per line in a UTF-8 text file. Use forward slashes and end directory paths with a slash.
  • Open the path list and the repository's root .gitignore.
  • Choose Run and download gitignore-report.json. For an excluded path, check the matching pattern and rule number.

Limitations

  • Up to 256 KiB per input file. Up to 5000 paths and 5000 rules, with 1024 characters per path or rule.
  • A single root .gitignore is evaluated with case-sensitive matching. Nested and global ignore rules and the Git index are outside this scope.
  • Files are processed on your device in the browser.

Example use

The dist/ rule excludes dist/keep.js even with !dist/keep.js. The report identifies the parent directory rule.

Example file workflow · .gitignore rule tester. The dist/ rule excludes dist/keep.js even with !dist/keep.js. The report identifies the parent directory rule.
Example data to enter in the form

Questions and answers

Can I tell whether Git tracks a file?

The report evaluates ignore rules. Check the Git index to determine the file's tracking state.

Related tools

Compare .env files

Compare an .env template with one or two environments. Find key differences without exposing their values.

.gitignore rule tester

Check access and export conditions in the app. A product description does not grant access.