General dev

.gitignore Templates

Runs locally

Use .gitignore Templates

What it does

Tick one or more languages and copy a starter .gitignore. Keeping .env files and build output out of Git matters: exposed .git folders and .env files on web servers are a common source of leaked credentials.

It runs entirely in your browser: nothing you enter is uploaded.

Example

Node project

Input
Node and General ticked, then Generate
Output (captured 2026-10-20)
# General
.DS_Store
Thumbs.db
.idea/
.vscode/
*.swp
*.swo
*~
.env
.env.local

Prints a # Node block (node_modules/, dist/, build/, .env, .env.local, npm-debug.log*, yarn-error.log*, .DS_Store, coverage/) followed by the # General block.

FAQ

What is in the templates?

Short starter lists for Node, Python, Go, Java, Rust, PHP, Ruby and C/C++, plus a General block for editor and OS files (.idea/, .vscode/, .DS_Store, Thumbs.db). Ticked templates are joined in order, each under a # heading; all except Rust and C/C++ ignore .env.

Are these the full GitHub templates?

No. They are deliberately short, and lines repeated across blocks are not merged. The Rust, PHP and Ruby lists ignore lock files (Cargo.lock, composer.lock, Gemfile.lock) that applications usually commit, so remove those lines if you need reproducible installs.

Is anything uploaded?

No. The file is assembled in your browser from lists built into the page.