.gitignore files from GitHub .gitignore patterns.
Homebrew users (macOS / OS X)
Homebrew users can install getignore using the following commands:
brew tap gotgenes/homebrew-gotgenes brew update brew install getignore
Chocolatey users (Windows)
Chocolatey users can install getignore using the following command (as admin):
choco install getignore
Windows, Linux, and macOS / OS X
Download and unpack a pre-compiled executable from the releases page. Make sure to place the executable in your shell's
getignore supports the following commands:
You can get help on getignore itself with
You can use
help to get the full usage information of any other command. For example, to get the full usage of the
get command, run
getignore help get
get command to obtain gitignore patterns from remote repositories. By default, it will obtain patterns from the GitHub gitignore repository, and write these patterns to the
STDOUT. Simply pass in the names of the ignore files you wish to retrieve.
getignore get Go.gitignore Global/Vim.gitignore
downloads and concatenates the Go and Vim ignore patterns and writes them to
.gitignore extension on the names optional. Feel free to omit the extension; the previous example could be issued more simply as
getignore get Go Global/Vim
so long as they share a common extension. (See also the
If you'd like to write the contents directly to a file, use the
-o option. For example,
getignore get -o .gitignore Go Global/Vim
Would write the contents of the Go and Vim ignore patterns into the
.gitignore file in the current working directory (
When retrieving many ignore patterns, it can be helpful instead to list names in a file, instead. Given the following file,
Go Node Yeoman Global/Eclipse Global/Emacs Global/JetBrains Global/Linux Global/NotepadPP Global/SublimeText Global/Tags Global/TextMate Global/Vim Global/Windows Global/Xcode Global/macOS
we can get all the patterns in this file by passing it via the
getignore get --names-file names.txt
Please see the
get usage via
getignore help get for explanations of other options available.
Use this command to get a listing of available gitignore patterns files from a remote repository and print the listing to STDOUT. This allows users to standard *nix tools to manipulate the command's output. For example, the following command line command can be used to download all the "global" gitignore patterns files:
getignore list | grep Global/ | xargs getignore get
By default, it filters for files that end with the
.gitignore suffix, however, you can provide an alternative suffix via the
--suffix flag. To list all files, provide an empty suffix, e.g.
getignore list --suffix ''
getignore's dependencies are managed by the Glide package manager. First install Glide, then build getignore.
curl https://glide.sh/get | sh glide install go build