.gitignore Generator
Generate a .gitignore file by ticking your languages, frameworks, editors and operating systems. Copy or download the result. Everything runs locally in your browser; nothing is uploaded.
Tick the templates that match your project. The combined .gitignore updates instantly. Copy it or download it as .gitignore.
Languages, tools and OS
.gitignore
# Node.js node_modules/ npm-debug.log* yarn-debug.log* yarn-error.log* pnpm-debug.log* .npm/ .eslintcache *.tsbuildinfo dist/ build/ coverage/ # Next.js .next/ out/ next-env.d.ts .vercel/ # Env files & secrets .env .env.* !.env.example *.pem *.key secrets.json # VS Code .vscode/* !.vscode/settings.json !.vscode/tasks.json !.vscode/launch.json !.vscode/extensions.json # macOS .DS_Store .AppleDouble .LSOverride ._* .Spotlight-V100 .Trashes
Learn more
How .gitignore patterns work
Each line is a pattern. A trailing slash matches directories, * matches within a path segment and ** across directories. A leading ! re-includes a file excluded by an earlier pattern.
Global ignores for editors and OS
Put OS and editor files such as .DS_Store in a global ignore file with git config --global core.excludesfile so every repository benefits.
Frequently asked questions
What if a file is already tracked?
Ignoring a file does not untrack it. Run git rm --cached <file> and commit.
Should .env files be ignored?
Yes. Commit a .env.example with placeholder values instead.
Can I edit the output?
Copy it and edit freely. It is plain text.