Git & Version Control
.gitignore Pattern Tester
Enter a .gitignore pattern and file path to test whether the pattern matches, with explanation of wildcard, negation, anchoring, and directory matching rules.
No data is transmitted — everything runs locallyTool
About this tool
.gitignore Pattern Tester
The .gitignore Pattern Tester evaluates pattern matching against file paths, explaining wildcard, negation, anchor, and directory-only matching behavior.
• Debug a .gitignore pattern that isn't ignoring the right files
• Test negation pattern syntax before committing a .gitignore change
• Understand the difference between /dist/ and dist/ in gitignore
• Check that node_modules/ correctly ignores nested node_modules directories
Affiliate disclosure
Credential and secrets management for teams. 1Password provides enterprise password management and secrets infrastructure for development teams.
View credentials with 1Password
External site · Independent provider · We may receive a commission · Not a recommendation
FAQ
What does this tool tell you?
The .gitignore Pattern Tester evaluates pattern matching against file paths, explaining wildcard, negation, anchor, and directory-only matching behavior.
What affects the result most?
Pattern matching: * matches anything except /, ** matches across directories. Negation: !pattern re-includes a file excluded by an earlier pattern. Directory match: trailing / matches only directories — node_modules/ vs node_modules.
How should I use the result?
Use the result as a planning baseline. It is generated from the inputs you provide, so varying the inputs shows you the sensitivity of the calculation. Your actual situation may include factors this tool does not model; treat the output as one input to your decision.