Gitignore Generator
Assemble a .gitignore file from templates for your languages, tools and operating system. Select what applies, and the generator merges the rules and removes duplicates.
New projects usually need a README Generator alongside it — and if you are scaffolding a repo, the Mock JSON Generator can fill in sample data.
How to use the Gitignore
- 1 Select the languages, frameworks, editors and operating systems you use.
- 2 Review the generated patterns, which are grouped by source so you can see why each one is there.
- 3 Copy the file and save it as .gitignore in your project root.
- 4 Commit it before your first push so unwanted files are never tracked.
How to Use
Tick every template that matches your setup — a typical project needs one language, one editor and one operating system. Duplicate patterns are removed automatically and the result is grouped with comments.
- Language, framework, editor and OS templates
- Duplicate rules removed automatically
- Grouped with section comments
- Copy or download .gitignore
- No network requests
Frequently asked questions
Does adding a pattern untrack files that are already committed?
No — and this catches people out. Git only applies .gitignore to untracked files. Anything already committed keeps being tracked until you remove it from the index with git rm --cached, after which the ignore rule takes effect.
Why does the order of patterns matter?
Later rules win, and a leading exclamation mark negates a previous pattern. So you can ignore an entire build directory and then re-include one specific file inside it — but only if the exception comes after the rule it is overriding.
Should I ignore node_modules or package-lock.json?
node_modules always — it is reproducible from the manifest and huge. Lock files are the opposite: package-lock.json and yarn.lock should be committed, because they pin exact versions and make builds reproducible. Ignoring them is a common and costly mistake.
Related Generators & Misc
You might also need
Tools from other categories that people pair with the Gitignore: