# Node.js node_modules/ npm-debug.log* yarn-debug.log* yarn-error.log* .pnpm-debug.log* dist/ build/ .next/ .cache/ # Next.js out/ .vercel/ *.tsbuildinfo # VS Code .vscode/* !.vscode/settings.json !.vscode/tasks.json !.vscode/launch.json # macOS .DS_Store .AppleDouble .LSOverride ._* .Spotlight-V100 .Trashes
What Is a Gitignore Generator?
A gitignore generator creates a .gitignore file by combining templates for common languages, frameworks, and tools. Instead of copying a template from GitHub or writing patterns from scratch, you select what applies to your project (Node.js, Python, React, VS Code, etc.) and get a ready-to-use .gitignore. Add custom patterns for project-specific exclusions. Copy to clipboard or download as a file.
This tool includes templates for 20+ technologies: Node.js, Python, Java, Go, Rust, Ruby, C/C++, C#/.NET, Swift, Kotlin, React, Next.js, Vue, Angular, Flutter, Unity, macOS, Windows, Linux, JetBrains IDEs, VS Code, Vim, and Emacs.
Gitignore Pattern Syntax
Each line in .gitignore is a pattern. * matches any string; ? matches one character. dir/ matches only directories. ! negates a pattern. # starts a comment. Patterns are relative to the .gitignore location (usually the repo root).
Common patterns: node_modules/ (dependencies), dist/ or build/ (compiled output), .env (secrets), *.log (log files), .DS_Store (macOS metadata). The generator uses established community templates so patterns are accurate and comprehensive.
Best Practices for .gitignore
Ignore dependency directories (node_modules, vendor, __pycache__), build outputs (dist, build, target), IDE and editor files (.idea, .vscode, *.swp), OS files (.DS_Store, Thumbs.db), and environment files (.env) that may contain secrets. Don't ignore lock files (package-lock.json, Cargo.lock) unless you have a reason — they ensure reproducible installs.
Keep .gitignore at the repo root. For monorepos, you can use multiple .gitignore files in subdirectories. Review the generated file before committing; remove patterns that don't apply and add project-specific ones.
Frequently Asked Questions
Related Tools
Explore More Tools
Find this tool useful? Buy us a coffee to keep DuskTools free and ad-light.