Build .gitignore

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

freeworks offlinenothing uploaded
Tool.gitignore Builder
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 are combined into grouped .gitignore text with comments and blank lines. Duplicate patterns are removed while negation lines retain their order.

  • Template groups cover common generated files.
  • Repository-specific outputs remain optional.

Worked example

Node.js + Docker project
Build a .gitignore for a Node.js project with Docker support, dependencies, build output, env files, IDE, and OS patterns
Input
											Node modules: true
Dist: true
Env: true
Logs: false
Coverage: false
Ide: true
Os: true
Cache: false
Docker: true
Terraform: false
Custom: 
										
Output
												# Generated .gitignore

# Dependencies
node_modules/
bower_components/

# Build output
dist/
build/
.next/
out/
*.tsbuildinfo

# Environment
.env
.env.local
.env.*.local

# IDE
.idea/
.vscode/
*.swp
*.swo
*.iml

# OS
.DS_Store
Thumbs.db
Desktop.ini

# Docker
docker-compose.override.yml
.docker/
											

When to use this

New repositories, editor changes, and monorepo templates create ignore files.

Edge cases

  • Ignoring .env does not remove a file already tracked.
  • Negation order controls whether a path is re-included.
  • A trailing slash pattern matches directories only.

References