.gitignore Generator preset
Combine language, framework, operating system, and editor presets into a single .gitignore file.
What this tool does
.gitignore lists the file patterns Git should not track: build output, dependency directories, editor settings, and the hidden files operating systems scatter around.
What belongs in it depends on your stack. A Node project needs node_modules, Python needs __pycache__ and virtual environments, macOS adds .DS_Store. Adding editor directories and environment files on top means hunting down each list every time.
This tool keeps the common sets as presets and merges whatever you tick into one file. Patterns that appear in several presets are included once, and each block carries a comment naming its source so the file stays readable later.
When to use it
Use it when starting a repository, when a new technology joins the project and rules must be extended, when cleaning up after files were committed by mistake, or when standardising ignore rules across projects.
Input and output examples
Node plus macOS plus Env & secrets
# Node
node_modules/
dist/
...
# macOS
.DS_Store
...
# Env & secrets
.env
!.env.example
Comment headers make the origin of each block clear.
Patterns shared by several presets
Included only once
Entries such as vendor/ are not repeated.
Notes and limitations
.gitignore applies only to files Git is not already tracking. Adding a rule for a committed file changes nothing until you remove it from the index with git rm --cached. More importantly, secrets that were already committed remain in history regardless of any rule: if a .env file or key was ever committed, the only real remedy is to revoke those credentials and issue new ones. Preset paths also assume a conventional layout, so adjust them when your project is structured differently.
Frequently asked questions
My file is still tracked after adding a rule.
Rules do not apply to already committed files. Remove it from the index with git rm --cached and commit.
I committed .env by accident.
It stays in history even after adding a rule. Revoke and reissue the affected credentials immediately; cleaning history is a secondary concern.
What does a line starting with ! mean?
It re-includes something an earlier rule excluded, such as ignoring .env.* while keeping !.env.example tracked.