How do you use this tool?
- Select templates — frameworks (Astro, Svelte, Bun, Deno, Vite …), languages, IDEs, operating systems. Multi-select is deduplicated automatically.
- Add custom lines below — internal build folders, secret files, whatever. One pattern per line.
- Pick a mode and toggles: Verbose/Lean, source attribution on/off, keep/remove negation patterns.
- Optionally switch on diff mode and paste your existing `.gitignore` to see exactly which lines would be new.
- Use the second tab to assemble a `.gitattributes` companion, then copy or download — everything stays local in the browser.
What does the gitignore generator do?
The generator is a mixer for .gitignore templates. You pick from a set of curated templates
(languages, frameworks, IDEs, operating systems and tooling), optionally add your own lines, and get
back a merged .gitignore — duplicates filtered, order preserved, negation patterns kept or stripped
on demand. The result can be copied or downloaded as a .gitignore file. Everything happens in the
browser. No upload, no account, no cookie banner.
Next to it sits a second tab for the classic companion file .gitattributes
with encoding, line endings, binary markers and Git LFS filters. Both files belong in almost every
repository, which is why the generator handles them in the same workspace.
What templates are bundled?
More than 30 templates grouped into five categories:
- Frameworks (2026 stack) — Astro, Svelte 5, SvelteKit, Tailwind v4, Bun, Deno 2, Vite, Vitest, Playwright. Plus the established mainstays Next.js, Remix, Solid and Qwik.
- Languages — Node, Python, Ruby, Go, Rust, Java, Kotlin, Swift, PHP, C++ and .NET.
- IDEs / editors — VSCode, JetBrains, WebStorm, Sublime Text, Vim, Emacs and Cursor.
- Operating systems — macOS, Windows and Linux.
- Tooling — Docker, Terraform, AWS CDK and general Git tooling.
The language and IDE templates derive from the github/gitignore repository (CC0-1.0, public domain). The 2026-stack templates are authored first-party because the canonical repository has no template for Astro, Svelte, Bun, Deno, Vite, Vitest or Playwright as of this release — the relevant pull requests have been pending for months.
What are the 2026-stack templates?
Inside the picker the 2026 entries carry a small 2026 tag. Their patterns are derived from the
official stack docs:
- Astro ignores
dist/,.astro/and the standard.envfamily. - Svelte 5 / SvelteKit ignore
.svelte-kit/in addition todist/andnode_modules/. - Bun keeps
bun.lockbtracked (per the official docs), with the ignore variant commented out. - Deno 2 ignores
deno.lock(the lockfile pins registry IDs and should be committed selectively) and_deno/. - Tailwind v4 ignores the Lightning-CSS engine cache
.tailwindcss/. - Playwright ignores
test-results/,playwright-report/andplaywright/.cache/.
How does the merge work?
When you click a template, its patterns are queued in the order you selected them. After collection two dedupe stages run:
- Exact string match — identical patterns from multiple templates land in the output once.
node_modules/from both Node and Astro shows up a single time. - Negation preservation — lines beginning with
!are kept by default. The Remove negations toggle strips them if you don’t need that override.
Comments and blank lines are NOT deduplicated — they carry structure the output should retain. Conflict patterns (two or more templates ship the same line) show up once in the output and once in the Overlapping patterns warner panel so you can see what was merged.
Source attribution
In Verbose mode every template block carries a visible section header (# ── Node ──,
# ── macOS ──). Lean mode strips them. The result stays readable without overloading the file with
meta comments. Per-pattern hover (inside the preview) additionally shows which template a line came
from — including conflict patterns where two or more templates contributed the same rule.
What does diff mode do?
If you already have a .gitignore in the project, enable Diff mode in the settings block and paste
the current file. The generator then shows three columns:
- New — lines the merge would introduce.
- Already present — lines that match between both versions.
- Only in your file — lines from your existing
.gitignorethat the merge did not produce. You see them so you can decide whether they should stay.
There is no big-bang replace. Copy the New column into your existing file and keep everything you already customised.
How is privacy handled?
Pure-client. All templates are bundled into the site at build time. Opening the tool does not fetch anything from github.com — not even in diff mode. Your template selection, your custom lines and the contents you paste into the diff stay in the browser. There is no telemetry endpoint, no cookie, no account. The bundled templates are visible in the public source of the generator.
What is deliberately left out?
The generator is an editor, not an audit. Deliberately not built:
- No repo scan — no OAuth integration with GitHub or GitLab. That would require server calls.
- No LFS configuration beyond filter rules —
.gitattributessets LFS extensions, nothing more. For track-storage and migration use thegit lfsCLI directly. - No server-side template fetch — the gitignore.io approach uses a server API. Here every template runs in the browser, so there’s no fetch limit and no tracking.
- No login / history — the last ten configurations are not saved. If you reuse the same combo often, keep it in your own snippet manager.
- No NLP input — no “describe your project and pick for me”. That would break the pure-client promise.
Where can I learn more?
- Git on Wikipedia — history, architecture, workflow
- git-scm docs: gitignore — the official pattern spec
- git-scm docs: gitattributes — encoding, line endings, LFS
- github/gitignore — the canonical CC0 collection that the language and IDE templates derive from
Last updated: