🚫 .gitignore Generator
Generate a .gitignore file for Node, Python, Go, Rust, Java, and more
Pick the project types you work with. The file rebuilds live — copy or download when ready.
About this tool
A .gitignore file tells Git which files and folders to skip — build artifacts, dependency directories, local environment files, and OS junk like .DS_Store or Thumbs.db. Committing these by mistake clutters diffs, bloats the repo, and can leak secrets from .env files.
Pick the stack and editors you use and the tool assembles a single merged file. For example, choosing Node + macOS produces a file that ignores node_modules/, dist/, .env, and .DS_Store in one block ready to drop into the repo root.
The templates are trimmed from the community github/gitignore collection to the entries most projects actually need.
FAQ
Where do I put the .gitignore file? ›
At the root of your Git repository. Patterns apply to the folder the file lives in and all subfolders. You can also place additional .gitignore files in subdirectories to add more specific rules.
I already committed files that should be ignored — what now? ›
Adding a pattern to .gitignore does not remove files Git already tracks. Run git rm --cached <file> for each one (or git rm -r --cached <folder>), commit, then the ignore rule takes effect.
Why is .env ignored but .env.example not? ›
The .env file typically holds real secrets (API keys, database URLs) and must never be committed. .env.example is a safe template with placeholder values that teammates copy from, so the rule negates it with an exclamation mark: !.env.example.
Should I commit lockfiles like package-lock.json or Cargo.lock? ›
For applications, yes — lockfiles pin exact versions and make deploys reproducible. For libraries, it depends on the ecosystem; the Rust template comments out Cargo.lock so you can decide. The Node template here keeps the lockfile tracked.