Search tools

Find a tool by name or what it does.

.gitignore Generator

Build a clean .gitignore for your project from ready-made templates. Pick the languages, frameworks, build tools, editors, and operating systems you use, merge and dedupe overlapping patterns, add your own rules, then copy or download the file.

Templates

3 templates selected.

Languages

Frameworks

Build and tools

Operating systems

Editors and IDEs

Everything runs in your browser. Nothing is uploaded.

Options

Identical patterns like node_modules/ are kept once across all sections.

One pattern per line. Lines starting with # are kept as comments.

Your .gitignore
3
Templates
28
Patterns
0
Duplicates merged

How to generate a .gitignore file online

  1. Pick your stack

    Select the languages, frameworks, build tools, editors, and operating systems your project uses from the template list.

  2. Merge and refine

    Keep merge and dedupe on to fold overlapping patterns into one clean file, add any custom rules, and sort if you like.

  3. Copy or download

    Copy the generated .gitignore to your clipboard or download it straight into the root of your repository.

Why use this tool

Ready-made templates

More than 30 curated templates covering popular languages, frameworks, build tools, editors, and operating systems.

Merge and dedupe

Overlapping patterns like node_modules/ and .DS_Store are folded to a single entry so the file stays short and readable.

Readable sections

Each source gets its own labelled section, so you can see exactly where every pattern came from.

Your own rules

Add custom patterns in a dedicated section that is deduped against the templates and keeps your comments intact.

Safe sorting

Optional A to Z sorting keeps each re-include rule attached to the pattern above it, so ordering never changes what the file matches.

Runs entirely in your browser

Everything happens on your device; nothing is uploaded.

About this tool

A .gitignore file tells version control which files to leave out of a repository, such as dependency folders, build output, editor settings, and operating system clutter. Writing one by hand means remembering dozens of patterns for every language and tool in a project, and it is easy to miss something or paste the same rule twice. This generator assembles the file for you from a library of curated templates.

Pick the languages, frameworks, build tools, editors, and operating systems your project uses, and each selection adds its own labelled section. Overlapping patterns such as node_modules/, dist/, and .DS_Store are merged into a single entry so the file stays short and easy to scan. You can add your own rules in a custom section, sort patterns within each section, and watch a live count of how many patterns and duplicates were folded together.

When it looks right, copy the result or download a ready to commit .gitignore straight into the root of your repository. Everything is generated locally in your browser, so nothing about your project ever leaves your device, and it works the same offline. Reach for it when you start a new repository, and pair it with the JSON formatter and other developer tools while you set the project up.

Frequently asked questions

How does the .gitignore generator work?
Choose the templates that match your stack and the tool concatenates their ignore patterns into one file, one labelled section per source. It runs the moment you make a selection, so there is no button to press before you see the result.
Which templates are included?
More than 30 templates spanning languages like Node, Python, Java, Go, and Rust, frameworks like Next.js, Django, and Rails, build tools, the macOS, Windows, and Linux operating systems, and editors such as VS Code, JetBrains, and Vim.
What does merge and dedupe do?
Many templates share the same rules, like node_modules/ or .DS_Store. With merge and dedupe on, a pattern that appears in more than one template is written only once, and the counter shows how many duplicates were removed. Turn it off to keep every template complete on its own.
Can I add my own patterns?
Yes. Type patterns into the custom rules box, one per line, and they are added in their own section. Lines starting with # are kept as comments, and your patterns are deduped against the templates too.
Does sorting change how the .gitignore behaves?
No. Order matters for re-include rules that begin with an exclamation mark, so sorting keeps each of those attached to the pattern it refines. The result stays alphabetised without changing which files are ignored.
Is my data uploaded anywhere?
No. Everything runs in your browser; nothing is sent to a server.

Related tools