.gitignore Generator

Combine stack, tool and OS templates into one file with no duplicated lines.

Languages
Frameworks
Tools
Operating system
Your own patterns, one per line

A line that already appeared in an earlier section is skipped, so combining templates never repeats itself.

.gitignore
# Node
node_modules/
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
.pnpm-store/
*.tsbuildinfo

# Next.js
.next/
out/
build/
.vercel/
next-env.d.ts

# Environment files
.env
.env.*
!.env.example
*.pem
*.key

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

Adding a path here does not untrack a file Git already knows about. Use git rm --cached for those.

How to Build a .gitignore

1

Pick your stack

Select the language, framework, tools and operating systems in play. Selecting more than one is normal, and overlapping lines are handled for you.

2

Add your own patterns

Anything specific to the project goes in the custom box, one per line. Local data directories and scratch notes are the usual candidates.

3

Save it as .gitignore

Download it into the repository root. Each contributor's editor and operating system entries belong here too, which saves everyone adding them separately.

Features

Twenty templates across languages, frameworks, tools and operating systems
Duplicate lines removed across combined templates
Commented sections so the file stays readable
Environment file patterns that keep .env.example tracked
Custom patterns appended in their own section
Copy or download as .gitignore
Runs entirely in your browser
Free with no sign-up

Frequently Asked Questions

Usually at the repository root, where it applies to everything below it. You can also place one in a subdirectory to add rules that only apply to that folder.

Because .gitignore only affects untracked files. Once Git is tracking something, adding it here changes nothing. Run git rm --cached on the path, then commit.

Yes, always, and commit a .env.example with the keys but no values instead. The environment template here does exactly that with a negation rule.

No for application repositories, where the lock file is what makes installs reproducible. The Rust template ignores Cargo.lock because that is the convention for libraries; remove that line for a binary.

It is convenient, since not every contributor has a global ignore set up. Purists prefer a global gitignore for .DS_Store and friends, but putting them here saves arguments.

Ignore the parent with a trailing slash, then negate the exception with an exclamation mark. Order matters: the negation has to come after the rule it overrides.

It covers the common ones. For something unusual, pick the closest template and add the specifics in the custom box.

Yes, completely free with no sign-up.

Need a Custom Tool or Application?

We build production-grade web applications, SaaS platforms, and developer tools. Let's talk about your project.

or book a free call