Developer Tools

.gitignore Generator

Build a clean .gitignore in seconds. Tick your languages, editors and operating systems and get a ready-to-paste file with the patterns you actually need.

Tool

About the .gitignore Generator

The .gitignore Generator runs entirely in your browser — nothing you paste is uploaded or stored.

A .gitignore file tells Git which files to skip, keeping build output, dependencies, editor settings and secrets out of your repository. Writing one from memory is error-prone; this generator assembles the standard patterns for your stack in one click.

How to use this tool

  1. Tick the languages, tools and operating systems your project uses.
  2. Add any project-specific patterns in the extra box, one per line.
  3. Press Generate and copy the result into a file named .gitignore at the root of your repository.

Why ignoring .env matters

The single most important line most projects forget is .env. Committing API keys, database passwords or tokens to a public repository exposes them to scrapers within minutes. Ignore your environment files and commit a .env.example instead.

Pro tip

Already committed a file you meant to ignore? Adding it to .gitignore is not enough — run git rm --cached path/to/file to stop tracking it, then commit.

Who is this tool for?

Developers starting a new repository, onboarding to a language they rarely use, or tidying a repo that is full of junk files.

Frequently asked questions

In the root of your repository, named exactly .gitignore with a leading dot. You can also add .gitignore files inside subfolders to scope rules.
No. Git only ignores untracked files. Use git rm --cached to untrack a file you previously committed.
No. The file is generated entirely in your browser.

Related tools

Guides for this tool