← All tools

.gitignore Pattern Tester

Check which pattern decides each path, without running Git or reading a repository.

Patterns and paths

One pattern per line. Blank lines and lines starting with # are skipped; ! re-includes a path; a trailing / matches directories only.

One path per line, relative to the .gitignore. End a line with / to test a directory; otherwise the path is tested as a file.

Git applies the last matching pattern, and a file cannot be re-included once a parent directory is excluded. A pattern containing a slash is anchored to the .gitignore directory; one without a slash matches at any depth. * and ? never cross a slash, ** does, and [...] classes are supported. Everything runs in this page: no repository access, storage, uploads or network requests.