ZapKit

.gitignore generator

Start a repository right: choose your stack and get one tidy .gitignore that keeps dependencies, build output, editor files and secrets out of git.

What is a .gitignore file?

A .gitignore file lists files and folders that git should not track: installed dependencies, build output, logs, editor settings, operating system clutter and secrets. Without one, repositories fill with noise and, worse, API keys and passwords get committed and leaked.

Tap the templates that match your project, from languages and frameworks to operating systems, editors and tools such as Docker and Terraform. Add your own rules, and the generator produces one combined file with duplicates removed, ready to copy or download.

How to use the .gitignore generator

  1. 1.Pick your stack

    Languages, frameworks, operating systems, editors and tools.

  2. 2.Add your own rules

    Project-specific folders or files.

  3. 3.Save it

    Copy or download, then save as .gitignore in the repository root.

Example: a Next.js project

Node.js, Next.js, macOS, Windows, VS Code and Secrets selected:

Rules
39
Duplicates merged
1 (*.tsbuildinfo appears in both Node and Next.js)
Kept on purpose
!.env.example and shared VS Code settings

node_modules, .next, .DS_Store and .env stay out of the repository from the first commit.

One file, no repeats

Templates are merged in a sensible order, each under its own comment, and rules already added by an earlier template aren't repeated. The Secrets template ignores .env files while keeping .env.example, so new contributors still see which variables to set.

Remember that .gitignore only affects untracked files. If something was committed before you ignored it, stop tracking it with git rm --cached <file> and commit, or it will keep showing up.

Frequently asked questions

Should I commit the .gitignore?

Yes. It belongs in the repository so everyone ignores the same files.

What does ! at the start of a rule do?

It re-includes something an earlier rule ignored, like !.env.example.

Why save it as gitignore.txt?

Some systems hide files starting with a dot. Rename it to .gitignore.

Where do OS files like .DS_Store belong?

Ideally in your global gitignore, but adding them here protects everyone.

More Developer tools