# .gitignore Generator & Tester - 40 Templates Online

> Free .gitignore generator: combine 40 templates (Node, Python, Java, Go, Rust, Unity, macOS, VS Code…), dedupe, add custom rules, test which paths git ignores.

- URL: https://qilingtools.com/en/gitignore
- Category: Developer Tools (https://qilingtools.com/en/dev)
- Tags: [Developer](https://qilingtools.com/en/tags/dev), [DevOps](https://qilingtools.com/en/tags/devops)
- Last updated: 2026-10-26
- Price: Free, no sign-up
- Privacy: Runs locally in the browser; files are never uploaded

Writing a .gitignore is usually the first thing you do in a new repository: dependencies, build output, logs, environment files, IDE settings and OS clutter should never be committed. Pick your stack here and get a merged .gitignore. There are 40 concise, hand-curated templates covering languages (Node.js, Python, Java, Go, Rust, C/C++, .NET, R, Swift, LaTeX), frameworks and platforms (Android, iOS, Flutter, Unity, Unreal, Laravel, Django, Rails, Next.js, Vite, Nuxt, Hugo, Jekyll, WordPress), build tools and package managers (Gradle, Maven, Composer, Yarn, pnpm, Bun, Deno, Docker, Terraform, Jupyter), editors (JetBrains, VS Code, Vim, Emacs) and operating systems (macOS, Windows, Linux). Selected templates are merged in the order you pick them, each under a ### Name ### header; duplicate rule lines are removed (unless a ! rule appeared in between, so precedence never changes), and your own rules can be appended at the end before you copy or download the file. The tester below checks paths with git’s real semantics — *, ? and [a-z] wildcards, leading and middle **, trailing / for directories only, anchoring when a pattern contains /, ! negation and the rule that files inside an ignored directory cannot be re-included — and shows which line decided the result. The matcher was verified against git ls-files output.

## How to use

1. Search and click the language, framework, tool, editor and OS templates you use (or pick a popular combo)
2. Keep deduplication on, append custom rules, then copy or download .gitignore
3. Paste file paths into the tester to see which are ignored and by which rule

## Features

- 40 concise templates across languages, frameworks, tools, editors and OSes
- Merged in click order with section headers
- Smart dedupe that never breaks ! rule precedence
- Custom rules appended at the end
- Path tester with git semantics: **, !, directory rules, anchoring
- Shows the matching line and ignored-parent reasons
- One-click popular combos
- Runs locally; download .gitignore directly

## FAQ

### Why is a file still committed after adding it to .gitignore?

.gitignore only affects untracked files. Remove an already committed file from the index with git rm -r --cached <path> (the file stays on disk) and commit; from then on it is ignored.

### Why doesn’t !logs/keep.txt work?

Once git ignores a directory it never looks inside it, so after logs/ a rule like !logs/keep.txt cannot re-include the file. Use logs/* together with !logs/keep.txt, or re-include the directory first with !logs/. The tester flags this case as “parent directory is ignored”.

### What is the difference between build, build/ and /build?

build matches a file or directory named build at any depth; build/ matches directories only; /build matches only at the repository root. A pattern with a slash in the middle, such as docs/build, is also anchored to the root — write **/docs/build to match it at any depth.

### Are these the same as GitHub’s official templates?

Not exactly. They are condensed from the official templates and common practice, keeping the rules most projects need so they stay easy to read and edit; add anything else as custom rules. Generation and testing run locally in your browser.

## Related tools

- [JSON Formatter](https://qilingtools.com/en/json): Free online JSON formatter: beautify or minify, validate with the exact line and column of any error, browse a collapsible tree, sort keys and escape strings.
- [Base64 Encode/Decode](https://qilingtools.com/en/base64): Free online Base64 encoder and decoder: UTF-8 safe, optional URL-safe variant, convert text to Base64 and back in real time. Processed locally, never uploaded.
- [URL Encode/Decode](https://qilingtools.com/en/url-encode): Free online URL encoder and decoder with encodeURIComponent and encodeURI modes. Escapes Chinese, spaces and special characters. Real-time and local, no upload.
- [JWT Decoder](https://qilingtools.com/en/jwt): Free online JWT decoder: decode the header and payload of a JSON Web Token, show expiry and issued-at times, all locally without uploading the token.
- [Timestamp Converter](https://qilingtools.com/en/timestamp): Free online Unix timestamp converter: convert timestamps and dates, auto-detect seconds or milliseconds, and show local, UTC, ISO 8601 and relative time.
- [Hash / Checksum](https://qilingtools.com/en/hash): Free online hash calculator: SHA-1, SHA-256, SHA-384 and SHA-512 of text or any file through the browser crypto API. Files never leave your device.
- [UUID Generator](https://qilingtools.com/en/uuid): Free online UUID generator: create RFC 4122 UUID v4 in bulk with a cryptographic RNG. Options for uppercase, no hyphens and braces, with one-click copy.
- [Base Converter](https://qilingtools.com/en/base-convert): Free online number base converter: convert between binary, octal, decimal, hexadecimal and any base 2–36. Uses BigInt for huge integers, computed locally.
