Developer / Git

.gitignore Generator

Build a .gitignore file for your project by picking languages, frameworks, editors, and operating systems from GitHub's 238 official templates, merged without duplicates.

.gitignore Generator: The generator combines the templates from GitHub's gitignore collection, the same ones GitHub offers when you create a repository, under a heading for each. A pattern already listed by an earlier template is left out, so the file has no duplicates, while each template's comments are kept to explain what is ignored. Runs 100% locally in your browser with zero server file uploads.

Runs
In your browser
Cost
Free · no sign-up
Availability
Ready to use
.gitignore generatorLocal processing

Runs entirely in your browser

Showing popular templates; search to find the others, including editors and operating systems.

Templates come from GitHub's gitignore collection (CC0), snapshot of 2026-09-28. Patterns already listed by an earlier template are left out, so the file has no duplicates.

How patterns work

Each line is a pattern: *.log ignores every .log file, a trailing slash such as build/ matches only folders, a leading slash such as /config.json matches only at the top of the repository, ** matches any number of folders, and a leading ! re-includes something an earlier line ignored.

To pick a licence for the same repository, use the license generator; to compare two versions of a file, the diff checker.

Checking what is ignored

Run git check-ignore -v <file> to see which line ignores a file, and git status --ignored to list every ignored file. A .gitignore in a subfolder applies to that folder and below.

How to use it

  1. Tick the languages and tools your project uses, and search for any others.
  2. Add your own patterns, such as .env, if you need them.
  3. Copy the result or download it as .gitignore into your repository's root.

Privacy & limitations

Templates are combined in your browser; nothing about your project is sent anywhere.

Related tools

Frequently asked questions

Why are files I already committed not ignored?

.gitignore only affects files Git is not yet tracking. Stop tracking a file with git rm --cached <file>, then commit; it stays on disk but leaves the repository.

Should editor and OS files go in the project's .gitignore?

Many teams prefer a global ignore file for them, set with git config --global core.excludesFile, so each person ignores their own editor's files. Adding them to the project does no harm.

Should I commit .env files?

No: they usually hold secrets. Ignore .env and commit an .env.example with the variable names and no values.

Free tool · runs in your browser · no account required