go-supertools
Developer & Data Tools

.gitignore Generator

Combine .gitignore templates for your languages, frameworks and editors, from the GitHub collection.

Runs in your browser Your input never leaves your device.

0 characters | 0 words

Report a problem with this tool

About this tool

A .gitignore file tells Git which files not to track: dependencies, build output, logs, secrets and editor files. Type the names of what you use, such as Node, Python, macOS and VisualStudioCode, one per line or separated by commas, and the tool joins the official templates from the GitHub gitignore collection (released into the public domain with CC0) into one file, each in its own section, with a header that records the version of the collection. Common nicknames work too: js, ts and react give Node, vscode gives Visual Studio Code, golang gives Go, and csharp gives .NET. You can add lines of your own at the end. Available templates: .NET, Android, Angular, Archives, Backup, C, C++, CakePHP, Clojure, CMake, Composer, Dart, Dropbox, Drupal, Eclipse, Elixir, Emacs, Erlang, Flutter, Go, Godot, Gradle, Grails, Haskell, Images, Java, Jekyll, JetBrains, Joomla, Julia, Kotlin, Laravel, Linux, Lua, macOS, Maven, NetBeans, Next.js, Node, Objective-C, OCaml, Patch, Perl, Python, Qt, R, Rails, Ruby, Rust, Scala, SublimeText, Swift, Symfony, Terraform, TeX, Unity, UnrealEngine, Vim, VisualStudio, VisualStudioCode, Windows, WordPress, Xcode, Zig. Names it does not know are listed in a comment, and you are told which ones. Each template was checked in a real Git repository with git check-ignore against typical files it should ignore, 84 paths in all, and a set of ordinary source files was confirmed as not ignored by any template. A .gitignore only affects files that Git does not track yet; to stop tracking a file already committed, remove it with git rm --cached. Never rely on .gitignore alone for secrets: if a secret was ever committed, treat it as leaked. Everything runs in your browser; nothing is uploaded.

How to use it

  1. List the languages, frameworks and tools you use.
  2. Optionally add your own lines.
  3. Copy the result into a file called .gitignore at the root of your repository.
  4. Check git status to see that the right files are ignored.

Common problems

A file is still tracked after adding it
A .gitignore does not affect files that are already committed. Run git rm --cached <file> and commit.
A template I need is not available
The tool includes the most used templates. The full collection is at github.com/github/gitignore; you can add lines of your own here.
Patterns do not work as expected
Patterns are matched from the folder of the .gitignore. A leading slash means the root, a trailing slash means folders only, and ! re-includes a file unless its parent folder is ignored.