Free

gitignore Generator

Pick your stack and get a .gitignore that is grouped, de-duplicated and commented - with a note on every template saying what it keeps as well as what it excludes.

  • Free forever
  • No signup
  • Runs in your browser

At a glance

Takes
A selection of languages, frameworks, tools, editors and platforms
Returns
A grouped .gitignore with overlapping entries removed
Handles
Negation rules kept in place, so a wrapper jar stays committed
Privacy
Runs in your browser - nothing you paste is uploaded

Nothing you type leaves this page

This tool runs entirely in your browser. Nothing you type or paste is sent to Revquix or to anyone else, no account is needed, and the page keeps working with your network disconnected.

Full detail in our privacy policy and AI policy.

How this works

About gitignore Generator

What it checks, what it deliberately does not, and how to read the output.

Curated rather than mirrored

The canonical collection of gitignore templates runs to hundreds of files and well over a megabyte, and nobody has ever needed most of it. What people need is a dozen stacks, three editors and the two operating systems that scatter metadata into every repository they touch.

So each template here is trimmed to the entries that earn their line, and each carries a one-line note - because half of these are genuine decisions rather than obvious ones. Whether a vendor directory belongs in the repository, whether the editor folder should be committed, and which build wrapper files must survive are all choices, and the defaults here have reasons.

  • The Gradle and Maven wrappers are explicitly kept - excluding them breaks the build for everyone else
  • The environment template ignores every dotenv variant while keeping the example file, which should be committed
  • The Terraform template excludes state files, which hold secrets in plaintext
  • The Android template excludes keystores while keeping the debug one

De-duplication that respects negations

Picking two overlapping templates should not emit the same pattern twice, so repeats are dropped and counted. Negations are the exception and are never treated as duplicates.

That distinction is load-bearing. Git applies the last matching rule, so a negation only works where it sits relative to the pattern it negates - collapsing or reordering those would silently change what is ignored, which is precisely how a wrapper jar goes missing from a repository.

Machine files versus project files

Editor and operating-system entries are grouped separately because they are not properties of your project at all. A colleague on another platform should not have to carry your platform’s metadata patterns, and there is a good argument that those belong in a global gitignore configured once per machine rather than in a file committed to every repository.

The tool offers them anyway, because most teams do commit them, and says which is which.

What it will not do

It cannot know your project. A generated file is a starting point that covers the usual build output for a stack, not an audit of what your repository is currently tracking.

It also does not untrack anything. Git ignores untracked files only, so a pattern added after a file has been committed changes nothing until you remove it from the index - and if that file was a credential, it remains in the history and must be treated as compromised regardless of what the gitignore says.

FAQ

Questions people actually ask

The ones that come up before somebody uploads anything.

Why is a file still tracked after I added it to gitignore?

Because gitignore applies to untracked files only. Once a file has been committed, git keeps tracking it regardless of any later pattern - you have to remove it from the index explicitly, then commit that removal. The file stays on disk; only its tracking stops.

Does adding a pattern remove a secret from my repository?

No, and this is the most consequential misunderstanding about the file. A pattern stops the next commit. A credential already in your history is still there, still fetchable by anyone with a clone, and still valid until you rotate it. Removing it needs a history rewrite - and rotating the credential first is the part that actually matters.

Should the editor folder be committed?

It depends on the team, which is why the tool offers it rather than deciding. Some projects commit a curated subset - shared run configurations and formatting settings - so everyone gets the same setup, and the template here keeps exactly those while excluding the per-user files. Others exclude the folder entirely.

Why does the output keep the build wrapper files?

Because they are meant to be committed. A wrapper is what lets a colleague build the project without installing the right build tool version first, and excluding it - which a careless pattern easily does - breaks the build for everyone but you. The templates carry explicit negations to protect them.

Should operating-system entries go in a global gitignore instead?

There is a strong case for it. Those files are produced by your machine rather than your project, and a colleague on another platform gains nothing from carrying your patterns. A global excludes file, configured once, keeps them out of every repository without putting them in any of them.

Next, try one of these

More from Developer, or browse the full catalogue.

What is already committed

A gitignore does nothing about the secret that is already in your history

Adding a pattern stops the next commit, not the last one - a key in an old commit is still there and still fetchable. Removing it properly means a history rewrite and a coordinated force push, which is a conversation worth having with somebody who has done it before.

Talk to an engineer from ₹549/hr