Home › Tools

.gitignore generator and tester

Tick the languages, tools and operating systems in your project to get a combined, de-duplicated .gitignore. Then paste file paths to see whether git would ignore them and which pattern decides, like git check-ignore -v.

🔒 Runs entirely in your browser. Nothing you paste is uploaded or sent to a server.

1. Pick your stack

2. Test it: is this path ignored? (checks the .gitignore above, edit it freely)

Pattern rules (what the tester implements)

Pattern Matches
*.log any file or folder ending in .log, at any depth (no slash means "match the name anywhere")
build/ a directory named build anywhere, plus everything inside it, but not a file called build
/todo.txt only todo.txt at the repository root (a leading slash anchors the pattern)
docs/*.md .md files directly in docs/, not in docs/api/ (a slash in the middle also anchors)
**/temp temp at any depth; logs/** = everything inside logs; a/**/b = a/b, a/x/b, a/x/y/b
!keep.log re-include something an earlier pattern excluded (the last matching line wins)
\#file, \!file a name that really starts with # or !

The tester was checked against git ls-files --ignored and git check-ignore on more than a hundred paths.

Why is my .gitignore not working?

Ignore node_modules/, build output, large binaries and .env files before the first commit. Committing them is how people end up with GH001: large files detected or GH013 secret-scanning rejections, and removing them later means rewriting history.

Last updated 2026-11-20.