Skip to content

Instantly share code, notes, and snippets.

@borysn
Created June 19, 2017 22:01
Show Gist options
  • Save borysn/589c27db60c186fb3c4ec03b2661474d to your computer and use it in GitHub Desktop.
Save borysn/589c27db60c186fb3c4ec03b2661474d to your computer and use it in GitHub Desktop.
global git ignore, ignore all things
#!/bin/sh
#
# ignore all the things
# author: borysn
# license: what's a license?
##############
# get things #
##############
# github.com/github/gitignore master url
THINGSURL="https://github.com/github/gitignore/archive/master.zip"
THINGSZIP="master.zip"
THINGSDIR="gitignore-master"
THINGS="*.gitignore"
ALLTHINGS=$HOME/.gitignore_global
# tmp dir
THINGSTMPDIR=${HOME}/.tmp/
if [ ! -d $THINGSTMPDIR ]; then mkdir $THINGSTMPDIR; fi
wget $THINGSURL -P $THINGSTMPDIR
unzip $THINGSTMPDIR/$THINGSZIP -d $THINGSTMPDIR
##################
# combine things #
##################
cat $THINGSTMPDIR/$THINGSDIR/$THINGS >> $ALLTHINGS
#####################
# ignore all things #
#####################
git config --global core.excludesfile $ALLTHINGS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment