gitignore Generator: combine templates for your languages, frameworks, editors and OS

Templates from github/gitignore (CC0 1.0, public domain).

About gitignore Generator

A .gitignore keeps build output, dependencies, logs and editor files out of your repository. This tool builds one for your whole stack: choose the languages, frameworks, editors and operating systems you use and it joins the matching templates into a single file.

Every template comes from the github/gitignore collection (CC0), bundled with the page. Sections are labelled, repeated rules are removed, and you can add your own rules at the end. The preview updates as you pick, and the selection is kept in the address so you can share it.

Everything runs in your browser and nothing is uploaded.

How to use it

  1. Search or scroll the list and click the templates you need. Click again to remove one.
  2. Optionally turn off the template comments, or add your own rules at the end.
  3. Check the preview next to the list.
  4. Copy the result or download it as .gitignore and put it in the root of your repository.

Frequently asked questions

What is a .gitignore file?

It is a text file in your repository that lists patterns Git should not track, such as build output, dependency folders, logs, editor settings and secrets files. Each line is a pattern, and lines starting with # are comments.

Where do the templates come from?

They are copied from the github/gitignore collection, the same templates GitHub offers when you create a repository. That collection is released under CC0, so it is free to use. The file is bundled with this page, so nothing is fetched while you use it.

How does the tool combine several templates?

Each template gets its own section header, in the order you picked them. If the same rule appears in more than one template, only the first copy is kept. A rule is kept again if a negation (a line starting with !) came between the two copies, because removing it would change what Git ignores.

Can I add my own rules?

Yes. Type them in the custom rules box and they are added at the end under their own header. Duplicates of rules already in the file are dropped there too.

Can I share my selection?

Yes. The templates you picked are saved in the address after the # sign, so you can bookmark or send the link. Your custom rules are not put in the address.

Why are some templates missing?

Only templates that could be copied exactly are included. Django, React / Next.js and Vue / Nuxt are the matching sections of the Python and Node templates, since the collection has no separate file for them.

Does adding a .gitignore remove files Git already tracks?

No. Git keeps tracking files it already knows about. Run git rm --cached on those files first, then commit, and the new rules take over.

Is anything sent to a server?

No. The file is built in your browser and nothing is uploaded or stored.