Skip to content

crheidri/git-ignore

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 

Repository files navigation

git-ignore

This bash script sources .gitignore templates from GitHub to the root of the current git repository as "/.gitignore". See the list of templates available at github/gitignore.

NOTE: names are case-sensitive (e.g. 'TeX' is a valid template, but 'tex' is not).

Getting Started

Clone this project and add it to your path:

foo@bar:~$ git clone https://github.com/crheidri/git-ignore.git ~/git-ignore
foo@bar:~$ export PATH=$PATH:$HOME/git-ignore

Currently git-ignore requires curl to source templates from GitHub. On Ubuntu Linux you can install it with:

foo@bar:~$ sudo apt-get install curl

Examples

Use the command git ignore <template> from anywhere within a git repository to download a .gitignore template matching <template>.

Project-specific .gitignore

foo@bar:~$ mkdir python_project
foo@bar:~$ cd python_project
foo@bar:~/python_project$ git init .
foo@bar:~/python_project$ git ignore Python

This will create the Python .gitignore template as ~/python_project/.gitignore

Global .gitignore

Templates organized as Global (operating system or editor specific) need to use the --global (-g) flag

foo@bar:~$ git ignore --global VisualStudioCode

License

GNU General Public License

About

Bash script to source .gitignore templates.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages