Skip to content
100% local

Gitignore generator

Build a .gitignore file from ready-made templates for languages, editors and operating systems.

Output

Gitignore generator

Pick the languages, runtimes, editors and operating systems your project touches, and this tool assembles a ready-to-use .gitignore from templates for Node, Python, Rust, Go, Java, PHP, Ruby, .NET, Swift, Android, C/C++, Dart, Unity, Terraform, JetBrains, VS Code, Vim, macOS, Windows and Linux. Select as many as you need — a typical setup is one language template plus your editor and your OS, so local files like node_modules, .idea or .DS_Store never end up committed.

Combining templates on their own risks repeats: both the Node and Python templates ignore a build directory, for example. Turn on "Merge duplicate rules" and the first occurrence of a rule wins, with later repeats dropped, so the file stays short and each line has one job. "Add section comments" wraps every template in a `### Name ###` header so you can see at a glance which block came from where, and "Sort sections alphabetically" reorders them by name instead of the default language-tools-OS grouping.

Project-specific paths rarely fit a shared template. The "Custom rules" field takes a comma- or newline-separated list — build artifacts, local config overrides, a folder unique to your repo — and appends it as its own section at the end, after the built-in templates. It is deduplicated against the rest of the file the same way, so a custom rule that repeats a template line does not create a second copy.

Everything runs in your browser: no project paths, file names or repository details are ever sent anywhere. Copy the result straight into your repository's .gitignore, download it as a .txt file to rename yourself, or send it to another tool to keep adjusting it.

FAQ

Can I combine several language templates at once?
Yes. Select any combination of languages, editors and operating systems and they are assembled into one file, in that order.
What does "Merge duplicate rules" do?
It removes a rule if an earlier section already added it, so a pattern like build/ that appears in more than one template is only listed once.
Where do my custom rules go?
They are appended as a final section, after every selected template, in the order you typed them.
Does the order of sections matter for how Git applies the rules?
No. Git applies every line in a .gitignore the same way regardless of which section it sits in; the ordering here is only for readability.
Is my project information uploaded anywhere?
No. The file is assembled entirely in your browser from built-in templates and whatever you type — nothing is sent to a server.