Skip to content
en es

.gitignore Generator

Tick the languages, frameworks, editors and operating systems you use and get one combined .gitignore, built from the official github/gitignore templates.

Runs in your browser — nothing is uploaded.

Templates

Keep each pattern only once.

One per line.

.gitignore

Pick at least one template to see the file.

Copied

How to use it

  1. Tick every stack you use: framework, language, operating system and editor.
  2. Add your own patterns in the box if you need to (they go at the end).
  3. Copy the result or download it as .gitignore and put it in the root of your repository.

Frequently asked questions

Where do the templates come from?

From the github/gitignore repository, which is public domain (CC0). They are bundled with this page, so nothing is downloaded when you pick one.

My file is already tracked. Why is it not ignored?

A .gitignore only affects untracked files. Remove the file from the index with git rm --cached <file>, then commit.

What does “remove repeated patterns” do?

When two templates contain the same pattern, only the first one is kept. Comments and “!” exceptions are never removed.

Should I commit .env files?

No. Keep secrets out of the repository: ignore .env and commit a .env.example without values.

Where should editor and OS rules go?

Either in the project .gitignore, so every contributor is covered, or in your global ignore file (core.excludesFile) if you want them applied to all your repositories.