.gitignore Builder for React / Next.js

Generate a .gitignore for React or Next.js projects

Build a .gitignore for React and Next.js projects. Covers .next, out, node_modules, .env.local, build, coverage and Vercel/Netlify output, then copy or download — all in your browser.

Why ignore the .next and out folders?

The .next folder holds Next.js build artifacts and out holds the static export; both are regenerated from your source on every build. Committing them bloats the repo and causes merge noise, so they belong in .gitignore.

A focused .gitignore builder for React and Next.js repositories. Instead of copy-pasting from an old project, tick the sections your app actually uses — dependencies, the .next build output, environment files, logs and editor cruft — and the tool assembles a clean, labelled .gitignore you can copy or download.

How it works

Each toggle maps to a curated block of ignore patterns. When you enable a section, its lines are concatenated under a # Header comment so the final file stays readable. The blocks cover the things Git should never track in a React or Next.js project: the node_modules/ dependency tree, the /.next/ and /out/ build directories, .env.local and its variants, debug logs, coverage reports, and OS files like .DS_Store. Selecting nothing leaves the output empty; selecting several merges them in order.

What gets ignored

The Dependencies block ignores node_modules/ plus Yarn Plug’n’Play files. Next.js ignores /.next/, /out/, next-env.d.ts and the .vercel deploy folder. The Local env files block excludes .env.local, .env.development.local, .env.test.local and .env.production.local so secrets stay out of version control.

Tips

Place the generated file at the root of your repository — Git applies the patterns to every subdirectory automatically. If a file is already tracked, run git rm --cached <file> and commit so the new ignore rule takes effect. Keep a committed .env.example (not ignored) so teammates know which environment variables your app expects.