About the .gitignore Generator
The .gitignore Generator runs entirely in your browser — nothing you paste is uploaded or stored.
A .gitignore file tells Git which files to skip, keeping build output, dependencies, editor settings and secrets out of your repository. Writing one from memory is error-prone; this generator assembles the standard patterns for your stack in one click.
How to use this tool
- Tick the languages, tools and operating systems your project uses.
- Add any project-specific patterns in the extra box, one per line.
- Press Generate and copy the result into a file named
.gitignoreat the root of your repository.
Why ignoring .env matters
The single most important line most projects forget is .env. Committing API keys, database passwords or tokens to a public repository exposes them to scrapers within minutes. Ignore your environment files and commit a .env.example instead.
Pro tip
Already committed a file you meant to ignore? Adding it to .gitignore is not enough — run git rm --cached path/to/file to stop tracking it, then commit.
Who is this tool for?
Developers starting a new repository, onboarding to a language they rarely use, or tidying a repo that is full of junk files.