Created
June 19, 2017 22:01
-
-
Save borysn/589c27db60c186fb3c4ec03b2661474d to your computer and use it in GitHub Desktop.
global git ignore, ignore all things
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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