.gitignore Generator
Build .gitignore files from templates for Node, Python, Java, Go and more.
The .gitignore Generator assembles a .gitignore file from curated templates — Node, Python, Java, Go, Rust, PHP, .NET, operating systems, IDEs and popular frameworks — plus any custom rules you add, ready to copy into your repository.
A good .gitignore keeps node_modules, build output, environment files and IDE settings out of version control — where they bloat repos, leak secrets and cause merge noise. Templates give you the standard rules for your stack without memorizing every pattern.
Rules are written per line with # comments, and templates are organized by heading so the combined file stays readable. Review before committing — the goal is ignoring what should be ignored, nothing more. Runs locally in your browser.
.gitignore
# --- Node --- # Dependencies node_modules/ # Logs logs *.log npm-debug.log* # Environment .env .env.* # Build output dist/ build/ coverage/
Templates are concise, community-standard starting points — review rules before committing so you never ignore files you need.
How to use the .gitignore Generator
- Click the templates that match your project and OS.
- Optionally add custom rules in the text area.
- Read the assembled .gitignore.
- Copy it into your project root.
- Commit it early — before build artifacts accumulate.
Frequently asked questions
What should every .gitignore contain?
Your toolchain's dependencies (node_modules/, vendor/, __pycache__/), build output (dist/, target/, build/), environment files (.env — they hold secrets) and your OS/editor droppings (.DS_Store, .idea/).
How do I un-ignore a file inside an ignored folder?
With negation: ignore the folder (node_modules/) then re-include exceptions using !path, e.g. !node_modules/example.txt. This generator's templates follow that pattern where needed.
Does .gitignore affect already-tracked files?
No — files already committed stay tracked even if added to .gitignore. Remove them first (git rm --cached) if you want to stop tracking them.
Related tools
View all developer tools →JSON Formatter & Validator
Format, minify and validate JSON instantly with clear error messages that point at the exact problem.
Dev ToolsJSON Validator
Check if your JSON is valid and find syntax errors with exact line and column.
Dev ToolsJSON Minifier
Compress JSON to its smallest valid form for storage and transport.
Dev ToolsJSON to CSV
Convert a JSON array of objects into a clean CSV file in one click.
Dev ToolsCSV to JSON
Convert CSV (from Excel or Google Sheets) into a JSON array of objects.
Dev ToolsBase64 Encoder
Encode text or files to Base64 — standard or URL-safe — in your browser.