🙈 .gitignore Generator

Check off the languages, frameworks and tools your project uses and get a combined .gitignore file, deduplicated and ready to paste.

How the templates are combined

There are fourteen short templates - Node, Python, Java, Maven, React, macOS, Windows, Linux, VS Code, JetBrains, Docker, Terraform, Logs and Environment Files - and the ones you tick are concatenated in that order. Any pattern already emitted by an earlier section is dropped, matching on the exact line, while # headings are always kept. Tick Node and React together and React shrinks to what Node did not already cover:

# React
.env.development.local
.env.production.local

These are compact starting points rather than copies of the long github/gitignore files, so add anything your build produces that is missing.

Reading the patterns

The templates are built into this page, so the file is assembled in your browser with no request to any API. Select the text in the output box to copy it.

Frequently asked questions

Why is git still tracking a file after I added it to .gitignore?

Because the file is already committed, and .gitignore only applies to untracked files. Run git rm --cached path/to/file, then commit - the file stays on disk and leaves the index.

Should .gitignore be committed to the repository?

Yes. It is shared project configuration, and everyone cloning needs the same rules. Keep purely personal entries out of it and put them in .git/info/exclude, or in a global file set with core.excludesFile.

A secret was committed before I ignored it - is deleting it enough?

No. The value stays in the history for anyone who clones. Rotate the credential first, then rewrite the history with git filter-repo or BFG if the repository is public.