UtilityToolsLab

© 2026 UtilityToolsLab. Built and maintained by the UtilityToolsLab Team.

About·Changelog·Privacy Policy·Terms of Service·Contact
HomeDevOps & Config Generators.gitignore Generator

Related Tools

Compose Generator

.gitignore Generator — 30+ Templates

Build a .gitignore from 33 language, framework, OS and editor templates, remove duplicates, add your own rules and test which paths would be ignored.

You Might Also Like

All DevOps & Config Generators

Compose Generator

Build a docker-compose.yml from forms: add services, map ports, set env vars, mount volumes and wire dependencies. Downloads as a ready-to-run YAML file.

Case Converter

Convert text to UPPERCASE, lowercase, Title Case or Sentence case, or to camelCase, PascalCase, snake_case and kebab-case for code. Paste and copy.

Lorem Ipsum

Placeholder text in 20 languages — English, Bengali, Hindi, Arabic, Spanish, French, Chinese and more. Paragraphs, sentences, words, lists, optional emoji.

English Lorem Ipsum

Generate free English Lorem Ipsum dummy text for web design, layouts, and mockups. Classic Latin filler text in paragraphs, sentences, words, or lists.

One forgotten line in a .gitignore and a .env full of keys is on GitHub. Tick the parts of your project, from Node.js to Unity to macOS, and get one tidy file, with any rule that two templates share written only once.

It starts with Node.js, secrets, logs, macOS, Windows and VS Code selected. The test box beneath it holds a small project, where .env shows as ignored and .env.examplestays kept, so you can see the file working before you use it.

How to Use the Templates and Path Tester

  1. Pick from 33 templates for languages, frameworks, infrastructure, operating systems and editors. The filter box finds one quickly.
  2. Add anything specific to your project under Your own rules.
  3. Paste real paths into Test paths, one per line, ending folders with a slash. Each shows ignored or kept and the line that decided it.
  4. Press Copy or Download, and save the file as .gitignore in the root of your repository.

The tester is the part worth trying when a file will not behave. It tells you when a file is ignored because of its folder, as in node_modules/express/index.js, which is usually why a! rule seems to do nothing.

The Method: How Git Decides

Git reads the rules in order and the last match wins, so .env.* followed by !.env.example ignores every env file except the example. A slash at the start or in the middle ties a pattern to the repository root; without one it matches at any depth. A trailing slash matches folders only, and ** crosses folders. A file cannot be re-included if its parent folder is ignored, because git never looks inside. The tester was checked against real git check-ignore on a file tree: 67,289 path checks with no differences.

When Not to Use a .gitignore Alone

A .gitignore only affects untracked files. If a file was already committed, adding a rule does nothing until you run git rm --cached on it, and a secret that was pushed stays in history, so change the key as well. Each folder can hold its own .gitignore; this tester treats yours as the one at the root. Browsers rename a file that starts with a dot, and Chrome saves this one as gitignore.txt, so rename it after downloading. The templates are a sensible start, not a guarantee, and matching here is case-sensitive, as git is by default on Linux.

Languages

Frameworks

Infrastructure

Common

Operating systems

Editors

4 of 8 paths ignored

  • keptsrc/index.ts
  • keptpackage.json
  • ignorednode_modules/express/index.jsline 2: node_modules/ (folder node_modules/)
  • keptdist/app.js
  • ignored.envline 15: .env
  • kept.env.exampleline 17: !.env.example
  • ignored.DS_Storeline 34: .DS_Store
  • ignoredlogs/server.logline 27: logs/ (folder logs/)