getignore
getignore bootstraps .gitignore files from GitHub .gitignore templates.

Installation
Homebrew users (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 OS X
Download and unpack a pre-compiled executable from the releases page. Make sure to place the executable in your shell's PATH.
See the Building section, below.
Usage
getignore supports the following commands:
help
You can get help on getignore itself with
getignore help
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
Use the 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.
For example,
getignore get Go.gitignore Global/Vim.gitignore
downloads and concatenates the Go and Vim ignore patterns and writes them to STDOUT.
Note the .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 --default-extension option.)
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 (./.gitignore).
When retrieving many ignore patterns, it can be helpful instead to list names in a file, instead. Given the following file, names.txt
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 --names-file option
getignore get --names-file names.txt
Please see the get usage via getignore help get for explanations of other options available.
Building
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