Skip to content

Instantly share code, notes, and snippets.

@codegefluester
codegefluester / git-ignore.sh
Last active December 31, 2015 13:39
Fetches a gitignore template from Github and adds it to the repo.
#!/bin/sh
# Example: git-ignore.sh Objective-C
template=$1
currentDir=`pwd`
if [ $template ]
then
echo "Fetching https://raw.github.com/github/gitignore/master/$template.gitignore"
curl https://raw.github.com/github/gitignore/master/$template.gitignore -o "$currentDir/.gitignore"