DevToolsmith

Gitignore Tester

Paste ignore patterns and a list of repository-relative paths. Check which paths are excluded and inspect the rule responsible for each match.

Runs 100% in your browser — nothing is uploaded

gitignore patterns
Tip: drop a file here36 chars · 36 bytes · 5 lines
Repository-relative paths (one per line)
Tip: drop a file here74 chars · 74 bytes · 5 lines

Use forward slashes. Add a trailing slash for a directory. Rules apply as one root .gitignore file; this does not inspect a Git index, global excludes or nested .gitignore files.

3 ignored · 2 included

Ignore results and matching rules
171 chars · 171 bytes · 8 lines

Try an ignore and an exception

Enter *.log followed by !keep.log. A path named debug.log is ignored while keep.log is included. Rule order matters: a later matching rule can override an earlier one.

Use repository-relative paths

Enter forward-slash paths such as src/app.ts, without a leading slash or ./. Give directories a trailing slash. The matching engine is node-ignore, a JavaScript implementation of Git ignore rules.

Frequently asked questions

Why does a negated path stay ignored?

Git cannot re-include a file when a parent directory is excluded. Re-include the parent directory before negating the file, or change the directory rule to exclude its contents instead.

Does this inspect my Git repository?

No. This applies one root .gitignore rule list to paths you supply. It does not inspect tracked files, the Git index, global excludes, .git/info/exclude or nested .gitignore files. Use git check-ignore in your repository for the final result.