.gitignore Pattern Tester
CodePaste a .gitignore file and a list of file paths, and see which paths would be ignored, matching gitignore glob semantics including negation patterns (!) and directory-only rules.
Paste your .gitignore contents and a list of candidate paths, and it tells you which ones git would actually ignore, following the real matching rules instead of a rough approximation. A leading ! negates a pattern, a trailing / restricts a match to directories, a pattern with a / in the middle is anchored to the .gitignore's own directory, and a pattern with no interior / can match at any depth. When multiple patterns match the same path, the last one in the file wins, which is exactly the part people get wrong when hand-tracing a long .gitignore. One real git behavior it doesn't replicate: git also refuses to re-include a file whose parent directory was already excluded by an earlier pattern unless that directory itself has a matching negation, and this tester evaluates each path independently of that ordering rule.
How to use .gitignore Pattern Tester
- 1.Paste the contents of a .gitignore file into the first box.
- 2.List the paths you want to test, one per line, in the second box (add a trailing / to mark a path as a directory).
- 3.Check the results table for which paths are ignored versus included, and which specific pattern and line number decided each outcome.
Frequently asked questions
Use via API, SDK, or MCP
cURL# Free: 1,000 req/day · Pro: 10,000 req/day
curl -X POST https://api.utilix.tech/v1/tools/gitignore-tester \
-H "Authorization: Bearer utx_live_..." \
-H "Content-Type: application/json" \
-d '{"gitignore":"node_modules/\n*.log\n!important.log","paths":["node_modules/foo.js","src/index.js","debug.log"]}'Get an API key from your dashboard · Full API docs →