GitIgnore Validator
Test your .gitignore patterns and validate if files are properly ignored. Perfect for debugging gitignore rules and ensuring your repository stays clean.
🎯 Professional GitIgnore Validation Tool
This tool uses the minimatch library - the same pattern matching engine used by npm, Webpack, and other professional tools. Results are accurate and reliable, following Git's exact ignore behavior.
.gitignore Content
18 rulesTest File Paths
9 paths⚡ Quick Test Examples
💡 How GitIgnore Patterns Work
Basic Patterns
*.log
- Ignores all .log filestemp*
- Ignores files starting with "temp"node_modules/
- Ignores entire directory.env
- Ignores specific file
Advanced Patterns
**/*.log
- Ignores .log files at any depth!important.log
- Exception (don't ignore)/build
- Only ignores root build directory**/cache
- Ignores cache directories anywhere
How to Use the Validator
Step 1: Add Your .gitignore Content
Paste your .gitignore file content in the left panel. You can include comments and empty lines.
Step 2: Test File Paths
Enter file or directory paths you want to test in the right panel. The validator will show whether each path would be ignored or tracked.
Understanding Results
- Ignored: File will be ignored by Git
- Tracked: File will be tracked by Git
- Pattern: Shows which rule matched
Common GitIgnore Patterns
File Extensions
*.log
*.tmp
*.swp
*.DS_Store
Directories
node_modules/
build/
dist/
.git/
Wildcards
**/*.log
temp*
**/cache
!important.log