.gitignore Generator
A missing .gitignore is how API keys end up in Git history and how 400 MB of node_modules gets pushed to GitHub. This generator outputs a tested template for your stack, Node, Python, Rails, or Laravel, with dependency folders, build output and environment files already excluded.
How to generate a .gitignore
-
1
Pick your stack
Node, Python, Rails or Laravel: each has its own set of transient artefacts.
-
2
Generate
The tool merges common rules (.DS_Store, .env, node_modules) with stack-specific ones.
-
3
Save as .gitignore
Place the file at the repo root before the first commit.
-
4
Commit it
.gitignore itself should be tracked: it is part of the project, not a local preference.
Why the common block is always present
| Rule | Reason to ignore |
|---|---|
.DS_Store |
macOS Finder metadata, never useful to other machines |
.env |
Secrets: API keys, database passwords, OAuth credentials |
.env.* |
Environment-specific variants (staging, production) |
!.env.example |
But keep the example file so new contributors know the shape |
node_modules/ |
Installable from package.json; huge and platform-specific |
Stack-specific additions
| Stack | Key additions |
|---|---|
| Node | dist/, coverage/, npm-debug.log* |
| Python | __pycache__/, .venv/, *.pyc, .pytest_cache/ |
| Rails | log/*, tmp/*, storage/*, /public/assets |
| Laravel | vendor/, /storage/*.key, /public/build, .phpunit.cache/ |
Common mistakes
- Committing
.envearly, then adding it to.gitignore. The file is already in history, usegit rm --cached .envand rotate every secret that was in it. - Ignoring
.env.examplealong with.env. Teammates need the example to bootstrap. - Too-broad globs:
*.logcan hide production-critical log configs; be more specific when in doubt. - Platform-specific files not local to you: contribute them via a shared
.gitignore, not a personal one.
Personal vs project gitignore
For editor files unique to you (JetBrains IDEs, Emacs) use your global gitignore (~/.config/git/ignore) rather than bloating each project’s.
Frequently Asked Questions
Because .gitignore only prevents untracked files from being added. Run git rm --cached path/to/file to stop tracking an already-committed file, commit the change, and the rule will then exclude it.
No, lockfiles should be committed so every environment installs the exact same versions. Ignoring them re-introduces the “works on my machine” class of bug.
A leading slash anchors the pattern to the repo root. /logs matches only a top-level logs/ directory, while logs matches any logs directory at any depth.
No. The generated file is not stored or tracked. Your stack choice is sent to our server so the rules can be built, and in the multi-step mode it is also carried in the page link, but the file contents are not kept.
Related Tools
ASCII Table Reference
Full ASCII table from 0 to 127 with decimal, hex, octal, binary, standard names and HTML numeric-reference notation, including NUL, LF and DEL.
Color Palette Generator
Generate monochromatic, analogous, complementary, triadic or tetradic color palettes from a base HEX color and export copy-ready CSS variables.
HEX Color Picker
Pick or enter a HEX colour and get RGB, HSL, approximate CMYK, relative luminance and contrast ratios against white and black.
HTML Character Reference
Searchable list of HTML entities, their named and numeric codes, and a one-click copy for special characters and symbols.
FPS Counter
Measure browser FPS with requestAnimationFrame, smoothing, min/max frame rate, warnings and an optional graph. Runs locally with no upload or API.
JSON Formatter
Paste JSON to pretty-print with 2 or 4 spaces, minify it to compact output, or run a quick syntax check before copying the result.
Tool available in other languages
- Generator .gitignore [ID]
- ตัวสร้างไฟล์ .gitignore [TH]
- .gitignore-Generator [DE]
- Generator .gitignore [PL]
- Gerador de .gitignore [PT]
- .gitignore ジェネレーター [JA]
- Trình tạo .gitignore [VI]
- مولّد ملفات .gitignore [AR]
- .gitignore 생성기 [KO]
- Generador de .gitignore [ES]
- .gitignore-generator [SV]
- Générateur de .gitignore [FR]
- .gitignore-generator [NL]
- Generatore .gitignore [IT]
- Генератор .gitignore [RU]
- .gitignore Oluşturucu [TR]
- .gitignore 生成器 [ZH]