.gitignore Generator
Pick your operating system, editor, languages and frameworks, and get a clean, sectioned .gitignore built from community conventions — including the secrets patterns most templates forget. Copy or download; nothing is uploaded.
New to this? Read the .gitignore guide →
Everything runs locally in your browser — nothing is uploaded. The templates follow the conventions of the community github/gitignore collection, trimmed to the patterns that matter.
How to use the generated file
- Select your operating system, editor, language and frameworks — the file composes live, one labelled section per selection.
- Copy it into a file named exactly .gitignore at the root of your repository (or download and rename — browsers won't save dot-files directly).
- Commit the .gitignore itself; it only takes effect for files Git isn't already tracking.
Already-tracked files keep showing up?
A .gitignore entry doesn't untrack files that were committed before the rule existed. Remove them from the index once with git rm -r --cached <path> (the working copy is kept), commit, and the rule applies from then on. The guide covers this and the pattern syntax in detail.
Frequently asked questions
How do I use the generated .gitignore?
Copy the output into a file named exactly .gitignore at the root of your repository, or download it and rename (browsers won’t save dot-files directly). Commit the file itself — it takes effect for anything Git isn’t already tracking.
Why is Git still tracking a file I added to .gitignore?
.gitignore only affects untracked files. For files committed before the rule existed, run git rm -r --cached <path> to remove them from the index (your local copy is kept), then commit — the rule applies from then on.
Should I put .env files in .gitignore?
Yes — the Secrets & env files section covers .env, keys and credential files, and re-includes .env.example so you can commit a dummy template. If a real secret has ever been committed, ignoring it now is not enough: rotate it.
What is a global gitignore?
A personal ignore file applied to every repository on your machine, set with git config --global core.excludesFile ~/.gitignore_global. OS and editor junk like .DS_Store and .idea/ belongs there, since it’s a property of your machine, not the project.
Where do these patterns come from?
They follow the conventions of the community github/gitignore template collection, curated down to the entries that matter, with a labelled section per selection so the file stays readable.