.gitignore Generator

Produce a correct .gitignore for your stack in one click — dependencies, builds, secrets, OS junk.

Generate .gitignore files instantly. Free gitignore maker for Node, Python, Java, Go and React stacks.

Calculator Inputs

About .gitignore

Produce a correct .gitignore for your stack in one click — dependencies, builds, secrets, OS junk.

Pick the primary stack and optionally a second for monorepos. The generator merges curated rule sets — dependency folders, build output, environment files with secrets, logs, coverage, and OS droppings — deduplicated and sectioned.

The .env rule matters most: secrets committed once live forever in history. Everything runs in your browser.

Where it is used

New repos, stack migrations, polyglot monorepos, and teaching what must never be committed.

How to use the .gitignore

  1. Primary Stack — enter the value.
  2. Extra Stack (optional) — enter the value.
  3. Calculate — press the Calculate button to see the result instantly above.

Formula

Stack template(s) merged, duplicates removed, commented by section.

Examples

Example

stackA:node
stackB:none
Result: node_modules/, dist/, .env… (8 rules)

Frequently Asked Questions

Already committed node_modules?
Add the rule, then run git rm -r --cached node_modules and commit. The rule only stops future tracking.
One gitignore per repo or per folder?
One at root covers everything below. Nested files only for genuinely different rules (e.g. docs/ allowing built HTML).
Should .env.example be ignored?
No — commit the example (keys without values) so teammates know what to configure. Ignore only real .env files.