Gitignore Generator
Build .gitignore files fast.
Templates
About the Gitignore Generator
Pick the stacks your repository actually uses and get a .gitignore assembled from labelled sections. Thirteen templates cover Node, Next.js, React, Python, Java, Go, Rust, macOS, Windows, Linux, VS Code, JetBrains, and a .env and secrets block. The file rebuilds as you toggle, so you can see what each template contributes before you copy it into a new project.
How to use the Gitignore Generator
- Click the entries under Templates that match your stack; click one again to deselect it.
- Watch the .gitignore panel rebuild — each template is appended as its own labelled section.
- Press Copy and save the result as .gitignore in the root of your repository.
Frequently asked questions
- Where does the .gitignore file go?
- In the repository root, named exactly .gitignore. Git also reads a .gitignore placed in any subdirectory, where its rules apply to that directory and everything below it.
- Why is a file still tracked after I add it to .gitignore?
- Ignore rules only apply to untracked files. Git keeps tracking anything already committed, so run git rm --cached on the file and commit that change before the rule takes effect.
- Can I combine several templates?
- Yes, that is the point of the picker. Each selection is appended under a # ---- Name ---- header, so months later you can still tell which patterns came from which stack.
- What is in the .env / secrets template?
- Patterns for .env, .env.local, .env.*.local, *.pem, and secrets.json — the files most often committed by accident. It is not a substitute for a secret scanner, but it covers the common cases.
- Does this cover every language?
- No. The thirteen templates here target the most common stacks. For anything niche, generate the base and add the extra patterns by hand at the bottom of the file.