.gitignore generator

Combine .gitignore templates for your languages, frameworks, editors and OS.

Runs in your browser. Your input is not uploaded.

Loading the tool…

What it does

A .gitignore lists files Git should not track: dependencies, build output, editor settings and secrets. Templates for each language and tool are combined into one file, with a heading for each section.

Templates are from GitHub’s public gitignore collection.

How to use it

  1. Tick the languages, frameworks, editors and operating systems you use.
  2. Review the combined file.
  3. Copy it or download it as .gitignore.

Things to watch for

  • A file that is already tracked stays tracked after you ignore it. Run git rm --cached <file> to stop tracking it.
  • Editor and OS files are better in a global ignore file (git config --global core.excludesFile) than in every project.

Questions

Why is my file still showing in Git after I ignored it?
It was committed before. Remove it from the index with git rm --cached and commit.
Should .env be ignored?
Yes. Commit a .env.example with placeholder values instead.
What does a leading slash mean?
/build matches only at the repository root. build/ matches a directory named build anywhere.
Can I un-ignore one file?
Yes. Add a line starting with !, such as !.vscode/extensions.json, after the rule that ignores it.