.gitignore Generator

Generate a .gitignore file tailored to your language, framework, or editor in one click.

Selected:

📐 How to Use

  1. Search or browse the list and select all languages/tools you're using.
  2. Selected templates combine automatically with duplicates removed.
  3. Copy the output or download it directly as .gitignore.
  4. Place the file in your project's root directory.

🎯 When to Use This

  • Starting a repository on a stack you have not touched in a while, when you cannot recall which build directories it leaves behind.
  • Combining the ignores for a framework, an editor and an operating system so a mixed team stops committing each other's local files.
  • Giving a new contributor a baseline file, rather than letting .DS_Store and .idea folders arrive in their first pull request.
  • Auditing an existing .gitignore against a fresh template, to see which patterns a project has quietly accumulated or lost.

❓ Frequently Asked Questions

QCan I combine multiple templates?
Yes — select as many as apply (e.g. Node + React + VS Code + macOS) and they'll be merged into one file with duplicate lines removed.
QWhat if my .gitignore already has custom rules?
Generate the template rules here, then manually append your project-specific custom ignores below the generated section.
QWhere does .gitignore go?
In the root directory of your Git repository, alongside your .git folder.

ℹ️ About This Tool

A .gitignore file is a list of path patterns matched against files Git does not already track. That last part catches people out: adding a pattern does nothing to a file already committed, which still needs git rm --cached before Git will forget it. A trailing slash restricts a pattern to directories, a leading exclamation mark re-includes something an earlier line excluded, and a .gitignore deeper in the tree takes precedence over one above it.

This generator holds twenty-five templates covering languages, frameworks, editors and operating systems, narrowed by the search box. Selecting several combines them: each keeps its own comment header, and any line identical to one already emitted in an earlier block is dropped so the file does not repeat itself. The result can be copied or downloaded straight to disk as a file already named .gitignore.

⚠️ Notes & Limits

  • Twenty-five templates are built in, and they are a fixed snapshot rather than a live copy of github/gitignore, so a newer framework may be missing.
  • The PHP template ignores composer.lock and the Go template ignores go.sum, both files most teams deliberately commit, so read the output before saving it.
  • Deduplication compares whole lines exactly, so node_modules/ and /node_modules both survive into the same file as separate entries.
  • Blocks are concatenated in the order you selected them, so a negation line only re-includes a file when the pattern it reverses came earlier.