LinuxCommandLibrary

git-ignore-io

Create .gitignore files for specified projects

TLDR

List available templates

$ git ignore-io list
copy

Generate a .gitignore template
$ git ignore-io [item_a,item_b,...]
copy

SYNOPSIS

git-ignore-io [-f|--force] [--dump] [-h|--help] [list | add | <profiles>]

PARAMETERS

-f, --force
    Overwrite .gitignore if it already exists (for direct output modes)

--dump
    Dump full list of available profiles to stdout instead of using web API

-h, --help
    Display help message and exit

DESCRIPTION

git-ignore-io is a powerful command-line interface to the gitignore.io web service, designed to generate comprehensive .gitignore files for various programming languages, frameworks, IDEs, operating systems, and build tools. Developers often spend time manually compiling ignore patterns; this tool automates that by fetching curated lists from a centralized API.

To use it, simply specify comma-separated profiles, e.g., git-ignore-io Node,VisualStudioCode,Docker, which outputs a ready-to-use .gitignore to stdout. Redirect it with > .gitignore for immediate project setup. The list subcommand displays all available profiles (over 500), helping users discover options like Python, Java, macOS, or JetBrains.

The add mode appends patterns to an existing .gitignore without overwriting, ideal for incremental updates. It requires internet access, as it queries the live API at www.gitignore.io. On Linux, install via Cargo (cargo install gitignore), Snap, or package managers like Arch's AUR. Profiles can be combined flexibly, ensuring broad compatibility. Community-contributed patterns keep it updated with modern tools like Flutter or Unity. This streamlines Git repository initialization, reducing errors from unignored files like caches, logs, or binaries.

CAVEATS

Requires internet connection for profile fetching; offline mode limited to --dump. Not all niche tools may have profiles. Always review generated file for project-specific needs.

EXAMPLES

git-ignore-io list — List all profiles.
git-ignore-io Node,Rust,Linux > .gitignore — Generate combined file.
git-ignore-io add Swift — Append to existing .gitignore.

INSTALLATION (LINUX)

Via Cargo: cargo install gitignore.
Arch: yay -S gitignore.
Snap: snap install gitignore.

HISTORY

Launched in 2013 by Aron Wadler as a web service; CLI tool developed shortly after, with Rust-based versions gaining popularity around 2018 via Cargo. Maintained by community contributions to profiles database.

SEE ALSO

git(1)

Copied to clipboard