Skip to content
T
Tools.Town
Free Online Tools for Everyone
.gitignore Generator illustration

.gitignore Generator

100% Free

Build a clean .gitignore by combining curated templates for Node, Python, Rust, Go, macOS, Windows, JetBrains, VS Code, Docker and more.

15 Templates
Instant
100% Client-Side
No Sign Up

1. Choose templates

Languages
Frameworks
Operating Systems
Editors
Tools

Options

Line endings

2. Preview .gitignore

14 patterns · 2 templates
# Generated by Tools.Town — .gitignore Generator
# https://tools.town/tools/gitignore-generator/

### Node ###
node_modules/
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.pnpm-debug.log*
dist/
.npm
.env

### macOS ###
.DS_Store
.AppleDouble
.LSOverride
._*
.Spotlight-V100
.Trashes

Embed This Tool

Easy to Embed

Add .gitignore Generator to your website or blog in seconds.

  • Responsive design
  • Lightweight & fast
  • No backend required
  • Always up-to-date
<iframe
  src="https://tools.town/embed/gitignore-generator/"
  width="100%"
  height="600"
  style="border:none; border-radius:12px;"
  loading="lazy"
  title=".gitignore Generator">
</iframe>

Share This Tool

Share Instantly

Share .gitignore Generator with anyone — no login required.

  • Shareable link
  • No login required
  • Works on any device
  • No account needed

Share via

Advertisement

How to Use

  1. 1 Search and tick the stacks you use — languages, frameworks, OS, editors
  2. 2 Add any custom patterns of your own, one per line
  3. 3 Choose LF or CRLF line endings to match your team
  4. 4 Watch the .gitignore preview build live, with duplicates removed
  5. 5 Copy to clipboard or download the ready-to-commit file

Features

  • 15 curated templates across languages, frameworks, OS, editors, and tools
  • Automatic de-duplication so shared patterns appear only once
  • Searchable, grouped picker with a one-tap Select All
  • Custom-pattern box for project-specific ignores and comments
  • LF or CRLF line endings for cross-platform teams
  • Copy or download — runs entirely in your browser

Why it Matters

A good .gitignore keeps build artefacts, dependency folders, secrets, and OS clutter out of your repository from the very first commit. Assembling one by hand means hunting down the right patterns for each tool in your stack and reconciling overlaps. Combining vetted templates gets you a complete, de-duplicated file in seconds, so your history stays clean and your secrets stay out of version control.

★★★★★

Use Cases

New Projects

Start every repo with the right ignores from commit one

Polyglot Stacks

Merge Node, Python, and Docker patterns without conflicts

Keeping Secrets Out

Ensure .env files and credentials never reach Git

Cross-Platform Teams

Cover macOS, Windows, and Linux clutter in one file

What this tool does

The .gitignore Generator assembles a complete, de-duplicated .gitignore file by combining curated templates for the languages, frameworks, operating systems, editors, and tools you select — plus any custom patterns you add.

How it works

Each template contributes a labelled block of ignore patterns. Patterns shared across templates are emitted only once, your custom lines are appended in their own section, and the chosen line ending (LF or CRLF) is applied. The logic is a pure function, so the same selection always produces the same file.

Privacy

Everything runs locally in your browser using built-in templates. Nothing is uploaded, logged, or stored.

Frequently Asked Questions

What is a .gitignore file?
A .gitignore file tells Git which files and folders to leave untracked — things like node_modules/, build output, log files, .env secrets, and OS metadata such as .DS_Store. Patterns matched by .gitignore are never staged or committed, keeping your repository clean and lightweight.
Where do I put the generated file?
Save it as .gitignore in the root of your repository (the same folder as your .git directory). Git applies it automatically to that directory and all subfolders. You can also keep additional .gitignore files in subfolders for more specific rules.
Does this remove files already committed to Git?
No. .gitignore only prevents untracked files from being added. If a file is already tracked, you must untrack it with 'git rm --cached <file>' and commit that change — after which the ignore rule takes effect.
What's the difference between LF and CRLF line endings?
LF (line feed) is standard on macOS and Linux; CRLF (carriage return + line feed) is the Windows convention. Pick the one your team uses to avoid noisy whitespace diffs. Most projects standardise on LF.
Is anything uploaded?
No. The file is assembled entirely in your browser from built-in templates. Nothing you select or type is sent, logged, or stored.

Related Tools You Might Like

Browse more free tools