Code Generator Tools

.gitignore Generator

Pick your languages, frameworks, editors and operating systems, and get one combined .gitignore with a section per template and duplicate patterns removed. Add your own patterns at the end.

Private by design: anything you enter is processed in your browser only. It is never uploaded to or logged on our servers. Share links contain the chosen templates and your custom patterns.

Selected (in this order)

Pick at least one template.

Save it as .gitignore in the root of your repository. Some browsers drop the leading dot when downloading; rename the file if so.

About .gitignore files

A .gitignore file tells Git which files to leave out of version control: dependencies such as vendor/ and node_modules/, build output, logs, caches, editor settings, operating-system clutter like .DS_Store, and secrets such as .env. Committing those makes repositories large, causes merge conflicts and can leak credentials.

Real projects mix several stacks: a Laravel app with a Vite front end, edited in PhpStorm on a Mac. Pick every template that applies and they are merged into one file, with a header per section. A pattern that an earlier section already lists is left out, so nothing appears twice. The templates follow the community-maintained github/gitignore collection, trimmed to the files each tool really creates.

Patterns only affect untracked files. If a file is already committed, stop tracking it with git rm --cached <file> (add -r for a folder), then commit. Everything runs in your browser.

Reference Guide

Pattern syntax:

PatternMatches
*.logAny file ending in .log, in every folder
build/Any folder named build (a trailing slash matches folders only)
/vendor/Only the vendor folder at the repository root (a leading slash anchors the pattern)
docs/*.pdfPDFs directly in docs, not in its subfolders (a slash in the middle also anchors)
**/temptemp at any depth
logs/**Everything inside logs
!.vscode/settings.jsonRe-include a file excluded by an earlier pattern (not possible if its parent folder is excluded)
[Dd]ebug/Debug/ or debug/
# comment, \#fileComment line; escape a leading # or ! with a backslash

Order matters: the last matching pattern wins. To check which rule ignores a file, run git check-ignore -v path/to/file. For ignores that should apply only on your machine, use .git/info/exclude or a global file set with git config --global core.excludesFile ~/.gitignore_global.

Frequently Asked Questions

.gitignore only affects files Git is not tracking yet. Remove the file from the index with git rm --cached <file> (or git rm -r --cached <folder>), keep it on disk, and commit. From then on the pattern applies.

Yes. Tick every language, framework, editor and operating system you use. The templates are merged into one file with a header per section, in the order you picked them, and patterns that appear in more than one template are written only once.

Usually not, because they hold personal settings. The VS Code template ignores .vscode but keeps shared files such as settings.json, launch.json and extensions.json; the JetBrains template ignores .idea completely. Personal patterns can also go in a global gitignore instead of the project file.

Yes, for negations. A line starting with ! re-includes a file excluded by an earlier pattern, and the last matching pattern wins. Run git check-ignore -v <file> to see which line ignores a file.