Skip to content
shellhacks.dev
Git

.gitignore Generator

Combine .gitignore rules for your stack, editors and operating system, such as Laravel, Node.js, Python, Go, Terraform, macOS and JetBrains, without duplicates.

Free · No sign-up · Your inputs stay in your browser

Input

Generate a .gitignore

Output

.gitignore

43 patterns

Duplicates across stacks are written once. Editor and OS files arguably belong in your global ignore (git config --global core.excludesFile ~/.gitignore_global) rather than in every repository. A file already committed stays tracked after it is ignored; git rm --cached <file> stops tracking it.

Runs in this browser. Nothing you paste is sent to a server.

What belongs in a project's .gitignore

Dependencies that are installed from a lock file (vendor, node_modules), build output, caches, logs, and local secrets such as .env. Editor and OS files arguably belong in your global ignore instead, set with git config --global core.excludesFile ~/.gitignore_global, so each repository does not have to list every editor its contributors use.

Already committed?

Ignoring a file does not untrack it. git rm --cached path stops tracking it while keeping it on disk. If the file was a secret, it is still in history: rotate the secret first. Pattern syntax, including ! to re-include and a trailing / for directories, is in the gitignore documentation.

Share

Frequently asked questions

Why is a file still tracked after adding it to .gitignore?
.gitignore only affects untracked files. Run git rm --cached on it and commit.
Should composer.lock and package-lock.json be ignored?
Not in applications: commit them so every install gets the same versions. Libraries commonly leave composer.lock out.
Is what I paste sent anywhere?
No. The tool runs entirely in your browser with JavaScript. Nothing you type or paste is sent to our server or stored.

Go deeper

Suggested reading

Keep planning

Similar tools