Skip to content

Gitignore Generator

Build a .gitignore from language, framework, editor and operating system sections, with duplicates removed.

Runs in your browserNo account neededFree
Loading tool…

Processing: This tool runs entirely in your browser. Your input and any file you open stay on your device — nothing is uploaded to a server.

How to use the gitignore generator

  1. Tick the languages, frameworks, editors and operating systems in use.
  2. Add any project-specific paths in the box below.
  3. Copy the result, or download it straight to a .gitignore file.

About this tool

A `.gitignore` keeps build output, dependencies and local configuration out of a repository. Those things are either reproducible from what is committed or specific to one machine, so committing them adds noise to every diff and conflicts to every merge.

The sections here are deliberately short. Published templates run to hundreds of lines covering toolchains nobody in the project uses, and a file that long is never read — which is how something important ends up ignored by accident. Each section is commented with what it covers, so the result can be checked by eye.

Patterns are deduplicated across sections. Node and Rust both want to ignore build directories, and a file that repeats the same line three times reads as generated rubbish rather than as a considered list.

The secrets section is the one worth keeping. It ignores `.env` and key files while making an exception for `.env.example`, because the example belongs in the repository — it documents which variables exist without carrying their values.

Common uses

  • Starting a new repository with sensible ignores from the first commit.
  • Adding editor and operating system ignores to an existing project.
  • Making sure environment files and keys cannot be committed by accident.

Frequently asked questions

Why is my file still tracked after adding it to .gitignore?
Ignore rules only apply to untracked files. Run git rm --cached on the path and commit the removal, and git will stop tracking it from then on.
Does ignoring a committed secret remove it?
No. The file stays in the history and can be recovered from any clone, so the credential should be treated as leaked and rotated, and the history rewritten if it matters.
Should .env.example be ignored?
No, and the secrets section deliberately excludes it. It documents which variables an application needs without containing any of their values.

Related tools