Skip to content

.gitignore Generator

Builds a .gitignore by combining language, framework and editor templates, with duplicates merged.

Combines the official GitHub `.gitignore` templates into one file. Selection order is output order, each section keeps the name of the template it came from, and a pattern that appears in two templates is written once.

🔒 Runs entirely in your browsergitgitignoregenerator

Templates

Languages

Frameworks & engines

Tools

Editors & IDEs

Operating systems

Verbatim from github/gitignore@32652622a46d — the repository behind GitHub's own template picker.

.gitignore

Templates

3

Patterns

115

Duplicates merged

0

Selection order is output order, each section keeps its source file name for later updating, and a pattern that appears in two templates is written once. Ignoring a file that is already tracked changes nothing until git rm --cached <file> untracks it.

How to use it

  1. Pick your language and framework

    Start with the language — Node, Python, Go — then add the framework if it has its own build directories.

  2. Add your editor and OS

    The ones people forget. `.DS_Store` and `.idea/` in a shared repository are the classic small annoyance, and adding them here costs one click.

  3. Download or copy it

    The header of each section names its source file, so when a template is updated upstream you can see which part of your file it corresponds to.

Common questions

I added a file to .gitignore and git still tracks it.

Because `.gitignore` only affects files git is not already tracking. Once a file is in the index, ignoring it changes nothing until `git rm --cached <file>` takes it out. This catches everyone at least once.

Where do the templates come from?

Verbatim from github/gitignore, the repository behind GitHub’s own template picker when you create a repo. Nothing is edited on the way in, so what you get here is what GitHub would have given you.

Should I ignore my lock file?

No — commit it. Some templates historically ignored `package-lock.json` or similar, and that advice has aged badly: a lock file is what makes an install reproducible. If a template you picked ignores yours, take that line out.

Feed it from

Next

These accept what this tool produces, so the result can go straight in.