Skip to content
AZ Tools

.gitignore Generator

Tick the languages, frameworks, editors, and operating systems you use — get one combined .gitignore ready to drop into a fresh repo.

Languages

Frameworks

Editors

Operating systems

Combined .gitignore(3)
# Node.js
node_modules/
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
.npm/
.yarn/
.pnp.*
dist/
build/
.env
.env.local
.env.*.local

# macOS
.DS_Store
.AppleDouble
.LSOverride
Icon
._*
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent

# VS Code
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
*.code-workspace
.history/

Snippets are curated from github/gitignore's templates and condensed to the lines projects actually use.

How to use

  1. Click the preset chips that match your project.
  2. Read the assembled .gitignore in the preview.
  3. Copy and paste into a .gitignore at the root of your repo.

About this tool

Show

Curated .gitignore snippets for the things you actually run into: Node, Python, Java, Go, Rust, PHP, Ruby; Next.js, Astro, Vite, Django, Rails, Spring, Flutter; VS Code, JetBrains, Sublime, Vim, Emacs; macOS, Windows, Linux. Pick what applies and the tool stitches them together with section headers — no duplicates, ready to commit. One thing the file cannot do for you: a path that git is already tracking stays tracked no matter what you add here, because ignore rules apply to untracked files only. Run git rm --cached on it once and the new rule takes effect from then on. Order matters within the file too — a later pattern beginning with an exclamation mark can re-include something an earlier line excluded.

Frequently asked questions

Why not just install github/gitignore?

Those templates are excellent but each is its own file. For a single repo you usually want a hand-picked combination of three or four — that's what this tool lets you assemble quickly.

Will this miss things specific to my setup?

Probably some — secret config files, local caches, build outputs of niche tools. Treat the output as a baseline and add a # Local section at the bottom for anything else.

I added a file to .gitignore but git still tracks it — why?

Ignore rules only apply to files git is not already tracking. Once a file is in the index, git keeps recording changes to it no matter what the ignore file says. Remove it from tracking first (git rm --cached path, which leaves the file on disk) and commit that removal; from then on the rule takes effect.

How do I make an exception inside an ignored folder?

Later rules override earlier ones, so a negation pattern can re-include something an earlier rule excluded — but not if one of its parent directories is excluded, because git never looks inside an ignored directory. Exclude the contents rather than the directory itself when you need an exception below it.

Related tools