All tools
Development tools

.gitignore Generator

Generate a complete .gitignore for any language or framework — select multiple stacks and merge them into a single ready-to-use file.

Node.js Python Java Go PHP Rust Swift Multi-stack merge Download file
Get started free Sign in

Free · No credit card · 50 credits/day

What gets ignored — common categories

📦

Dependency directories

node_modules/, vendor/, .venv/, __pycache__/, target/ — never commit dependencies; they are reproducible from a lock file.

⚙️

Build outputs

dist/, build/, out/, *.class, *.o — generated files that should be rebuilt, not versioned.

🔐

Secret files

.env, .env.local, *.pem, credentials.json — the most important category; secrets must never be committed.

🖥️

IDE and editor files

.vscode/, .idea/, *.suo, *.swp — personal editor settings that differ between developers.

🍎

OS junk files

.DS_Store (macOS), Thumbs.db (Windows), desktop.ini — OS metadata files that should never appear in repos.

📋

Logs and temp files

*.log, *.tmp, coverage/, .nyc_output/ — runtime-generated files that change constantly and should not be tracked.

Frequently asked questions

What does .gitignore do?

A .gitignore file tells Git which files and directories to exclude from version control. Patterns match file names (*.log), directories (node_modules/), or specific paths. Ignored files will not appear in "git status" and will not be added by "git add ." — preventing accidental commits of build artifacts, secrets and IDE files.

What is a global .gitignore?

A global .gitignore applies to all your repositories, not just one project. Use it for IDE files (.idea, .vscode), OS files (.DS_Store, Thumbs.db) and personal editor backups. Set it with: git config --global core.excludesfile ~/.gitignore_global. This keeps project .gitignore files clean and team-friendly.

How do I stop tracking a file that is already committed?

Adding to .gitignore only prevents future tracking. To untrack an already-committed file: 1) Add it to .gitignore. 2) Run "git rm --cached filename". 3) Commit the removal. The file stays on disk but Git stops tracking changes.

What is the difference between .gitignore and .gitkeep?

.gitignore excludes files from tracking. .gitkeep is a convention — an empty placeholder file placed in an otherwise-empty directory to force Git to track it (Git does not track empty directories). The filename .gitkeep is not special; any file works, but .gitkeep signals the intent clearly.

Related dev tools

More tools for project setup and Git workflow.

Diff Checker

Compare two .gitignore files to see what's different between your stacks.

SSH Key Info

Analyze your SSH key before connecting Git to GitHub, GitLab or Bitbucket.

API Request Tester

Test GitHub/GitLab APIs from your browser without extra tooling.

Stop committing files that shouldn't be there

Free account. 50 credits per day. Access to 75+ tools instantly.

Create free account →