Skip to content
ToolZone

.gitignore Generator

Generate customized .gitignore files for specific programming languages, frameworks, and development environments.

Runs in your browser. Nothing you enter or upload leaves your device.

Languages
Frameworks
OS / Editors
Other
.gitignore preview
# Node
node_modules/
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.pnpm-debug.log*
dist/
build/
.env
.env.local
.env.*.local
coverage/
*.tsbuildinfo

# React
.env.production

# macOS
.DS_Store
.AppleDouble
.LSOverride
Icon
._*
.Spotlight-V100
.Trashes

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

Keyboard shortcuts

Run the main action
⌘ / Ctrl + Enter
Copy the result
⌘ / Ctrl + Shift + Enter
Download the result
⌘ / Ctrl + S
Paste a file or image into file tools
⌘ / Ctrl + V
Search all tools
⌘ / Ctrl + K
Show these shortcuts
?

You can also drop files anywhere on the page.

About the .gitignore Generator

Every new repository needs a .gitignore so that dependencies, build output, secrets, and editor clutter stay out of version control. This .gitignore Generator combines ready-made templates for 23 languages, frameworks, operating systems, and editors into one file you can copy or download, without duplicate lines.

How it works

Each option is a short, hand-picked list of ignore patterns. Node, React, macOS, and VS Code are selected by default. Clicking a chip toggles it on or off, and the preview rebuilds immediately.

Selected templates are joined in the order you selected them, each under a heading comment such as # Node, with a blank line between sections. Patterns are copied as written, so if two templates both ignore node_modules/ or .env, the line appears twice. That is harmless, since Git simply applies the same rule again.

How to use

  1. 1

    Review the default selection (Node, React, macOS, VS Code) and click any chip to turn it off.

  2. 2

    Click the chips under Languages, Frameworks, and OS / Editors that match your project.

  3. 3

    Check the .gitignore preview below.

  4. 4

    Click Copy all or Download and save the file as .gitignore in your repository root. The page link keeps your selection.

Worked examples

Python project on Windows

A data script developed in a virtual environment on Windows.

Input
Python + Windows
Result
# Python __pycache__/ *.py[cod] *.egg-info/ .eggs/ .venv/ venv/ env/ .env ... # Windows Thumbs.db ehthumbs.db Desktop.ini $RECYCLE.BIN/ *.lnk

Next.js app on a Mac

A new Next.js site edited in VS Code.

Input
Next.js + macOS + VS Code
Result
# Next.js node_modules/ .next/ out/ build/ .env*.local .vercel *.tsbuildinfo next-env.d.ts # macOS .DS_Store ... # VS Code .vscode/* !.vscode/settings.json !.vscode/extensions.json

The VS Code rules ignore the folder but use ! to keep shared settings and recommended extensions in the repo.

Limitations
Only the 23 listed templates are available; there is no search for other languages or tools. Some browsers save the download as gitignore without the dot; rename it if so. Templates are short starting points, not exhaustive lists, so you may need to add project-specific paths.
Assumptions
The .gitignore is placed at the repository root. Your project uses the default build and dependency folders for its stack.
Privacy
The file is assembled in your browser, and your selections are not sent or stored.

Frequently asked questions

Can I combine rules for multiple frameworks?+

Yes. Select as many templates as you like and they are combined into one file, each under its own comment heading.

What happens if a file is already tracked by Git before I add it to .gitignore?+

Ignore rules only affect untracked files. Stop tracking an existing file with git rm --cached <file>, then commit; the file stays on disk and is ignored from then on.

Where do I put the .gitignore file?+

Save it as .gitignore in the root folder of your repository. You can add more .gitignore files in subfolders for rules that apply only there.

Why is node_modules/ missing from the React section?+

A rule that an earlier template already added is left out of later sections, so each line appears only once. Here node_modules/ is already in the Node section.

Should .env be ignored?+

Yes. .env files usually hold secrets such as API keys and passwords. Most templates here ignore it; commit a .env.example with empty values instead.

Related tools