About .gitignore Generator
Tick what your project uses (Node.js, Python, Unity, JetBrains IDEs, macOS and more) and get a single .gitignore with one headed section per choice. A pattern that appears in two templates is written once, and a section left with nothing new is dropped.
Add your own patterns at the end, then copy the result or download it as a file. The templates were written for this tool and cover the build output, caches, dependency folders and editor files each stack leaves behind.
How it works
- Sections are written in a fixed order (languages, frameworks and tools, editors, operating systems, then common files), whatever order you tick them in, so the same choice always gives the same file.
- Each pattern is kept the first time it appears and left out after that. A later copy of an identical line would change nothing in git’s rules.
- Patterns that start with ! re-include a file, and they stay after the line they relate to, as git needs.
- Your choice is kept in the page address, so a link reproduces the same file. Your own patterns are kept there too.
Questions
I added .gitignore but git still tracks a file. Why?
Ignore rules only apply to files git is not tracking yet. Run git rm --cached on the file (or -r on a folder) and commit; it stays on your disk but leaves the repository.
Should editor files go in the project .gitignore?
Many teams prefer each person to ignore their own editor files in a global ignore file (git config core.excludesFile). Including them in the project is harmless and helps contributors who have not set that up.
Why is the lock file not ignored?
Lock files such as package-lock.json, Cargo.lock and poetry.lock record exact dependency versions and should usually be committed, so none of the templates ignore them.
Is anything sent anywhere?
No. The templates are part of the page and the file is assembled in your browser.
Everything you enter here is processed in this browser tab. Nothing is uploaded, logged or shared. How privacy works here.