git
command to download and apply .gitignore
templates from
gitignore.io.
To install git-ignore
, run:
sudo make install
If you want to install in development mode, run:
sudo make dev-install
This will symlink the files instead of copying them, allowing you to work in your local repository and have changes reflected system-wide without having to reinstall.
To uninstall git-ignore
, run:
sudo make uninstall
Basic usage is git ignore <template>
. So for example, to ignore all C, C++, and macOS files:
git ignore c c++ macos
This will create a .gitignore
file in the current directory with the specified template(s),
or append to it if one already exists.
For a full list of options, run:
git help ignore
https://docs.gitignore.io/install/command-line
already provides some shell commands to alias in order to download .gitignore
templates.
The purpose of this tool is to expand upon this,
offering conveniences such as validation (i.e. checking the requested template exists),
autocomplete,
and a more standard git
workflow.
Special thanks to Toptal for creating gitignore.io, as well as to those who have contributed templates.
-
gitignore.io source code: https://github.com/toptal/gitignore.io
-
.gitignore
template repository: https://github.com/toptal/gitignore