Skip to content
Quickly and easily list and fetch .gitignore templates from www.gitignore.io
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
.gitignore
.travis.yml
CHANGELOG.md
Cargo.lock
Cargo.toml
LICENSE
README.md

README.md

git-ignore Build Status Crates.io

What and why

Far too often I find myself going to gitignore.io to quickly get .gitignore templates for my projects, so what would any reasonable programmer do for menial and repetitive tasks? Automate it! Now you can quickly and easily get and list all the templates available on gitignore.io.

Installation

Make sure you have Rust installed (I recommend installing via rustup), then run cargo install git-ignore-generator.

To list all the available templates:

$ git ignore --list
[
    "1c",
    "1c-bitrix",
    "a-frame",
    "actionscript",
    "ada",
    [...],
    "zukencr8000"
]

You can also search for templates (--list can be both before and after the queries):

$ git ignore rust intellij --list
[
    "intellij",
    "intellij+all",
    "intellij+iml",
    "rust"
]

Then you can download the templates by omitting --list:

$ git ignore rust intellij+all

# Created by https://www.gitignore.io/api/rust,intellij+all
# Edit at https://www.gitignore.io/?templates=rust,intellij+all

[...]

# These are backup files generated by rustfmt
**/*.rs.bk

# End of https://www.gitignore.io/api/rust,intellij+all

Finally, if need be, you can always run git ignore -h to see more options --- spoiler alert, there are none.

You can’t perform that action at this time.