.gitignore Generator
Compose a .gitignore file from a curated set of language, framework, editor, and operating-system templates. Deduplicates patterns across selections.
# Node node_modules/ npm-debug.log* yarn-debug.log* yarn-error.log* pnpm-debug.log* .pnp.* .yarn/* !.yarn/patches !.yarn/plugins !.yarn/releases !.yarn/sdks !.yarn/versions .env .env.local .env.*.local # VS Code .vscode/* !.vscode/settings.json !.vscode/tasks.json !.vscode/launch.json !.vscode/extensions.json *.code-workspace # macOS .DS_Store .AppleDouble .LSOverride Icon ._* .DocumentRevisions-V100 .fseventsd .Spotlight-V100 .TemporaryItems .Trashes .VolumeIcon.icns .com.apple.timemachine.donotpresent # Environment .env.development .env.production .env.test !.env.example
About .gitignore Generator
The .gitignore file tells git which files to skip when tracking changes. Every project needs one, and getting it right prevents committing node_modules bloat, .env secrets, editor swap files, OS-specific junk (Thumbs.db, .DS_Store), and build artifacts that pollute your repo. This .gitignore generator lets you pick from language, framework, editor, and operating-system templates β Node.js, Python, Java, Next.js, Vue, VS Code, JetBrains IDEs, macOS, Windows, Linux β and produces a combined, deduplicated .gitignore ready to drop at the root of your repository.
Templates are curated versions of the widely-used gitignore.io / github.com/github/gitignore patterns, trimmed to the essentials so the output stays readable. When you select multiple templates (say Node.js + Next.js + macOS + VS Code + environment files), the tool deduplicates identical patterns automatically β you never end up with node_modules/ listed three times. Useful for starting new repos on the right foot, auditing existing .gitignore files against the current best practices, and preparing template repos for teams that need consistent conventions across projects.
How to Use
Tick the languages, frameworks, editors, and operating systems your project uses.
The tool combines the selected templates and deduplicates identical lines automatically.
Use the filter box at the top to quickly find a specific template.
Copy the output or download it directly as a .gitignore file.
Drop the file into the root of your repo and commit it before you commit anything else.
Frequently Asked Questions
Do I need to commit .gitignore itself?
Yes. .gitignore is a regular tracked file β commit it once and every future clone or checkout applies the rules. Without committing, only your local repo respects the ignore rules.
What is the difference between .gitignore and .git/info/exclude?
.gitignore is shared with the whole team via commits. .git/info/exclude is local to your machine only β useful for personal files you never want to commit but do not need to force on teammates (like a personal notes file or debug logs).
How do I ignore a file that is already tracked by git?
Adding it to .gitignore alone will not un-track it. Run 'git rm --cached <file>' to remove it from the index while keeping it on disk, then commit β future changes to that file will be ignored.
Should I include .env in .gitignore?
Almost always yes. Environment files typically contain secrets (API keys, database URLs) that must never be committed to git. Commit a .env.example file with placeholder values instead, so teammates know what variables to define.
What is the difference between /node_modules and node_modules?
'node_modules' matches the folder anywhere in the repo β including nested workspaces. '/node_modules' matches only at the repo root. For most projects the unrooted version is what you want.