gitignore generator

Build a .gitignore from the stacks you actually run, with the lines that matter and none of the historical noise.

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

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

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

# macOS
.DS_Store
.AppleDouble
.LSOverride
Icon
._*

# Editors
.vscode/*
!.vscode/extensions.json
.idea/
*.swp
*.swo
.claude/

Questions

Why so much shorter than the official templates?+

Because those carry decades of tooling nobody uses any more, and a file nobody reads is a file where a real mistake hides. These are the lines that earn their place today.

What about files already committed?+

A gitignore only affects untracked files. For something already in the history, run git rm --cached on it first, and rotate it if it was a secret: it stays in the history either way.

Should I ignore the lock file?+

No, commit it: the point of a lock file is that everyone installs the same tree. The one exception is a Rust library, where Cargo.lock is conventionally left out.

Does a gitignore work in a subfolder?+

Yes. A .gitignore applies to its own folder and everything under it, and patterns without a slash match at any depth. A pattern that starts with a slash is anchored to the file's own folder, which is how you ignore /build without ignoring src/build.

Related tools

The tools are free. So is most of the library.

1935 blocks and 989 pieces for shadcn/ui and Tailwind, built on the same tokens these tools write. Install one with a command and the code is yours.

No signup for the tools. MIT for free blocks, commercial licence for Pro.

Markdown version