Git Ignore Pattern Tester
Check file and directory paths against a root .gitignore. Review matching rule lines, negated exceptions and excluded parent directories, then download a local report.
Trace Why Git Still Ignores a Kept File
Treat the supplied rules as one root .gitignore file. Enter one path per line and end directory paths with a slash.
Find & replace in input
Undo: Ctrl/Cmd+Z · Redo: Ctrl/Cmd+Shift+Z or Ctrl+Y. Up to 20 steps and 4 million retained characters in this tab. Clear discards history.
Git Ignore Pattern Tester: how to use it
- Paste root .gitignore rules and repository-relative paths, or open their UTF-8 files.
- End directory paths with a slash and choose ASCII case-insensitive matching if your Git settings need it.
- Select Test paths. Check the rule line and any blocked parent before exporting the report or the ignored path list.
Limits and notes
One root .gitignore and up to 1,000 lines or 100,000 characters per input. The report uses the supplied rules and paths. Git's tracked index and rules in other files or directories require a separate check in your repository.
How your privacy works →Git Ignore Pattern Tester: common questions
Why does !dist/keep.txt fail when dist/ is ignored?
Git skips an excluded directory before considering its contents. Leave the parent eligible, for example by ignoring dist/* instead, and keep the exception after the ignore rule.
How can I test whether a rule matches a directory?
End its repository-relative path with a slash. Use a path without the trailing slash for a file.
What does a blank rule line mean in my result?
No supplied rule matched that path. The report shows a separate state for a path included by an explicit exception.