Gitignore Generator

Pick your languages, frameworks and tools to build a clean .gitignore

Templates

3 selected · 0 official templates from github/gitignore

Loading templates…

.gitignore

0 lines
# Select at least one template

Examples

Ignore Node.js project output

Input
template: Node
Output
# Dependencies
node_modules/

# Build output
dist/
build/

# Environment
.env
.env.local

# OS / editor
.DS_Store
.vscode/

A Node template skips installed dependencies, build artifacts, local env files, and common OS/editor junk.

Combine multiple stacks

Input
templates: Node, macOS
Output
node_modules/
dist/
.env

# macOS
.DS_Store

Stacks merge into one file so a polyglot repository ignores the output of every language it uses.

About this tool

A .gitignore file tells Git which files and directories to skip — build output, dependency folders, environment secrets, editor config and OS-specific junk like .DS_Store or Thumbs.db. Committing any of those by accident clutters diffs, bloats the repo and can leak credentials. Starting a project with the right ignore rules from day one avoids all of that.

This generator ships a curated subset of GitHub's official github/gitignore collection (licensed CC0-1.0): 55+ templates covering the most-used programming languages, frameworks, editors/IDEs and operating systems. Pick the technologies in your stack from a searchable, categorized list and the tool merges them into one file, removing duplicate patterns that several templates share (for example *.log appears under both Node and Java).

The templates are bundled into the site at build time, so using the tool makes no network request and nothing you select leaves your browser. They load on demand the moment you open the page, keeping the route fast. The output is ready to save as .gitignore at the root of your repository.

How to use

  1. Search your stack

    Type a language, framework, editor or OS in the search box to narrow the list (e.g. "python", "rails", "vim").

  2. Select templates

    Toggle the chips for each technology in your project — Languages, Frameworks, Editors, OSes and a few Custom extras like environment files.

  3. Review the merged output

    The right pane builds a single .gitignore live, with each template under a # Name header and duplicate patterns removed across selections.

  4. Copy to your repo

    Click copy and save the result as .gitignore at the root of your repository.

Use cases

Bootstrapping a new repository

Generate a sensible .gitignore for your stack on day one so build output and secrets never get committed.

Adding a stack to an existing project

Append ignore rules when you introduce a new language or tool (e.g. adding Python to a JS repo) without hand-writing patterns.

Keeping secrets out of history

Ensure .env and credential files are ignored before the first commit, since removing them later doesn't erase prior history.

Template categories

CategoryExamples
LanguagesNode, Python, Go, Rust, Java, C++, Ruby, Swift, Kotlin, Elixir
FrameworksRails, Laravel, Symfony, Unity, UnrealEngine, Godot, Terraform
EditorsVisualStudioCode, JetBrains, Vim, Emacs, SublimeText, Xcode
OSesmacOS, Windows, Linux
CustomEnvironment (.env) and Logs

Templates are bundled from github/gitignore (CC0-1.0) — no runtime network call.

Common mistakes

Mistake:Committing a file before adding it to .gitignore.

Fix:Git only ignores untracked files. If a file is already tracked, add the pattern then run `git rm --cached <file>` so Git stops tracking it.

Mistake:Using a trailing slash incorrectly.

Fix:A trailing slash matches a directory (build/) but not a same-named file. Omit the slash only when you mean both a file and a folder.

Mistake:Expecting global ignore rules to cover sensitive files automatically.

Fix:Templates cover common output, not your custom secrets. Add any private config or key files explicitly, and verify with `git status` before pushing.

Frequently asked questions

References & standards