Runs in your browser
Gitignore Generator
Pick the stacks, operating systems, and editors your project uses and get a single combined .gitignore, with rules that appear in more than one template included only once. Templates are deliberately conservative: lockfiles are never ignored, and .env.example stays committed so new contributors still get it.
0 templates selected
Rules that appear in more than one selected template are included once. Lockfiles are never ignored — they belong in version control for applications — and .env.example is re-included so it stays committed.
ReadyGeneratorsFree · No account required
Related tools
Features
- 17 templates across languages, operating systems, and editors
- Combine as many as you need, with duplicate rules removed
- Searchable, with a live preview
- Copy, or download as .gitignore
How to use
- Tick the stacks, operating systems, and editors your project uses.
- Review the preview.
- Download the file, or copy it into your repository root.
FAQ
- Why aren't lockfiles ignored?
- package-lock.json, yarn.lock, Cargo.lock, and friends belong in version control for applications — they're what make an install reproducible. Some older templates ignore them, which is a genuine mistake for anything that isn't a published library.
- Why is .env.example re-included?
- Because `.env` is ignored with a broad pattern, `.env.example` would be caught too — and that file is meant to be committed so new contributors know which variables to set. The `!` rule puts it back.
- What happens when templates overlap?
- Duplicate rules are emitted once. Next.js and TypeScript both ignore *.tsbuildinfo, for example, so it appears under whichever section comes first.
- Does .gitignore affect files already committed?
- No. Git only applies ignore rules to untracked files. For something already in the repository you need `git rm --cached <file>` first, then commit the removal.