Gitignore Generator

Generate a .gitignore file from templates for your stack, plus your own custom ignore patterns.

100% FreeNo sign-upPrivate — runs in your browser

A .gitignore only stops future tracking — files already committed stay tracked until you run git rm --cached on them.

Copied to clipboard

How to use this tool

1
Pick your stacks

Select every stack your project uses — hold Ctrl/Cmd to select several.

2
Add custom patterns

One pattern per line, e.g. *.log or secrets.txt.

3
Generate the file

Patterns are grouped by stack and deduplicated automatically.

4
Save as .gitignore

Download it into your repository root and commit it.

Formula & worked example

Each selected stack contributes its template patterns under a # stack comment, then custom patterns are appended. Every line is deduplicated, so a pattern shared by two stacks or repeated in custom input appears once.

Stacks node + python with custom *.log produce node_modules/, __pycache__/ and *.log, with .env appearing only once even though both templates list it.

Limitations — read this before you rely on it

Templates are common starter patterns, not a guarantee for every project: check framework-specific output (for example Next.js, Laravel or Django) and add build folders by hand. A .gitignore never untracks files already committed — those need git rm –cached.

Frequently asked questions

No. It only prevents new files from being tracked. For already-committed files, run git rm –cached <file> and commit that change.

Any file ending in .log in any folder, unless a ! negation pattern re-includes it.

The pattern matches directories only — node_modules/ ignores the folder, not a file of that name.

Yes, always, if it holds real secrets. The node, python and php templates already include it.

Yes — the WordPress stack covers wp-config.php, uploads, .htaccess and cache. Theme/plugin build output may still need custom patterns.