Generate .gitignore

Create a .gitignore from language, editor, OS, and build patterns.

freeworks offlinenothing uploaded
Tool.gitignore Generator
Input
Output
Put this on your own site

The frame below runs the same code as this page, in the reader's own browser. Nothing is sent to us, and nothing is sent to you.

Pick a dark background and the text and panels follow it, so the frame stays readable on a dark page.

Preview

How it works

Selected patterns become grouped .gitignore text with comments and blank lines; duplicates are removed while negation order remains. The output does not inspect tracked files.

  • Common generated directories are useful starts.
  • Repository-specific artifacts remain optional.

Worked example

Node.js with VS Code on macOS
Generate a .gitignore for a Node.js project using VS Code on macOS
Input
											Language: node
Ide: vscode
Os: macos
Extras: true
										
Output
												# Node
node_modules/
dist/
build/
.next/
.nuxt/
out/
coverage/
*.tsbuildinfo
.turbo/
.vercel/
.output/
*.js.map

# Vscode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
*.code-workspace

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

# Environment & Secrets
.env
.env.local
.env.*.local
.env.production

# Logs
logs/
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Testing
coverage/
.nyc_output/

# Misc
.cache/
tmp/
temp/
											

When to use this

New repositories, IDE changes, and monorepos generate ignore files.

Edge cases

  • Ignoring a path does not remove an already tracked file.
  • A later negation needs a traversable parent directory.
  • Directory patterns differ from same-named files.

References