.gitignore Generator

Combine ready-made templates for languages, frameworks, editors and operating systems into one .gitignore.

Templates
# Node
node_modules/
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
.npm/
.eslintcache
dist/
build/
coverage/
*.tsbuildinfo

# Next.js
.next/
out/
next-env.d.ts
.vercel/

# Environment files
.env
.env.*
!.env.example

# macOS
.DS_Store
.AppleDouble
.LSOverride
._*

# VS Code
.vscode/*
!.vscode/settings.json
!.vscode/extensions.json
!.vscode/launch.json

How to use

1

Tick every template that matches your project.

2

Add any project-specific rules in the extra box.

3

Copy the result or download it as .gitignore and commit it.

Example

Node with environment files

The negated rule keeps a committed example file while ignoring real environment files.

Input
Node, Environment files
Output
# Node
node_modules/
...

# Environment files
.env
.env.*
!.env.example

Frequently Asked Questions

No. It only affects untracked files. To stop tracking a file, run git rm --cached on it and commit.

Explore

Connected career roadmaps, algorithmic problems, and real-world curricula related to .gitignore Generator.