piapia123
en

.gitignore Generator

Web & Network

Everything runs locally in your browser — nothing is uploaded

Input
Output

Tick the languages, frameworks, editors and operating systems your project uses and get a merged .gitignore back. Each template becomes its own section with a comment above it, and duplicate rules are kept only once — the build directory appears in the Node, Python and Java templates but ends up as a single line. The template contents come from the files each project officially maintains rather than being thrown together, so node_modules, __pycache__, .DS_Store, .idea and .env are all covered.

Features

  • 17 templates: Node.js, Python, Java, Go, Rust and PHP; Next.js, Nuxt, Django and Rails; VS Code, JetBrains, Vim and Sublime; macOS, Windows and Linux
  • Rules are deduplicated across templates, keeping the first occurrence
  • Every template becomes its own commented section, easy to edit or delete later
  • Append your own rules in the input box; they are kept verbatim, comments included, at the end
  • Negation lines stay directly behind the rule they except, so a wrapper jar is never ignored by accident
  • The header comment can be turned off

How to use

  1. Tick the templates your project needs — as many as you like
  2. Add your own rules in the input box, one per line, or just type a single # if you have none
  3. Click Run to generate, or Load sample to see merging and deduplication straight away
  4. Click Copy and paste it into .gitignore at the root of your project

FAQ

Why does nothing happen when I click Run?
The input box needs at least one character before this tool produces output. If you have no extra rules to add, just put a single # in there — it is only a comment and changes none of the generated rules.
Why is a rule missing from the section I ticked?
Because it already appeared in an earlier template. Deduplication keeps the first occurrence, so once the build directory shows up under Node it is not repeated under Python or Java. The rule still applies; which section it lands in makes no difference.
Could these rules ignore files I need?
They could, especially broad patterns such as lib, build, out or tags. Give the output a read and delete the lines you do not want. That is exactly why each template stays a separate section — deleting a whole block is far easier than picking one line out of hundreds.
Why are Cargo.lock and composer.lock not ignored?
For applications those two files belong in version control; ignoring them makes builds unreproducible. They only make sense to ignore when you are publishing a library. The tool leaves them alone, and you can add a line yourself if you want the opposite.
Why is .env being ignored?
A .env file normally holds keys and database passwords and does not belong in version control; the usual practice is to commit a .env.example instead. If your project really does commit .env, delete that line or add a !.env line in the input box — negations have to come after the rule they except.
Is anything uploaded?
No. Generation happens entirely in your browser and the page makes no network requests.

Related tools