Next.js .gitignore Template
Next.js .next build output, cache, and exported static directory. Generated and merged deterministically with upstream GitHub repository patterns to keep your repository clean of package directories, temporary build artifacts, and local environment files.
Interactive Stack Generator
Preconfigured with Next.jsNext.js .next build output, cache, and exported static directory
### Next.js #### See https://help.github.com/articles/ignoring-files/ for more about ignoring files. # dependencies/node_modules/.pnp.pnp.js # testing/coverage # next.js/.next//out/ # production/build # misc.DS_Store*.pem # debugnpm-debug.log*yarn-debug.log*yarn-error.log* # local env files.env*.local.env # vercel.vercel # typescript*.tsbuildinfonext-env.d.ts Raw Next.js .gitignore
Crawlable upstream source template# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. # dependencies/node_modules/.pnp.pnp.js # testing/coverage # next.js/.next//out/ # production/build # misc.DS_Store*.pem # debugnpm-debug.log*yarn-debug.log*yarn-error.log* # local env files.env*.local.env # vercel.vercel # typescript*.tsbuildinfonext-env.d.ts Key Pattern Breakdown
Dependencies & Package Registries
External libraries and package manager directories installed locally rather than stored in version control.
Build Outputs & Compiled Artifacts
Generated binary files, compilation targets, and distribution bundles that can be reliably reproduced from source.
Environment Secrets & Local Overrides
Local environment configurations, secrets, and credentials intended to protect developer-specific settings from exposure.
Execution Caches & Runtime Logs
Diagnostic logs, runtime metadata, test coverage reports, and incremental compiler caches that cause noisy repository diffs.
Operating System & Workspace Files
Editor-specific workspace configuration and OS filesystem metadata generated automatically by host operating systems.
Source & Verification
Place this file in the root directory of your project as .gitignore. Changes take effect on newly added or untracked files.