Added a clone alias

pull/1/head
Adam Veldhousen 2014-08-06 17:12:12 -05:00
parent d83c1107ca
commit 95af6240e1
1 changed files with 6 additions and 5 deletions

View File

@ -52,26 +52,27 @@ alias sym='~/nugetsymlink'
alias cw='compass watch $1' alias cw='compass watch $1'
alias dlb='dml' alias dlb='dml'
# delete merged local branches
function dml(){ function dml(){
for b in `git branch --merged | grep -v \*`; do git branch -D $b; done for b in `git branch --merged | grep -v \*`; do git branch -D $b; done
} }
function ehclone() function clone()
{ {
if [ -z "$1" ] if [ -z "$1" ]
then then
echo "Missing git repository url ending" echo "Missing git repository url ending"
echo "usage: ehclone 'extendhealth git repository ending' ['target directory name']" echo "usage: clone 'git repository ending' ['target directory name']"
else else
giturl="git@github.extendhealth.com:extend-health/$1.git" giturl="git@github.com:$1.git"
if [ -z "$2" ] if [ -z "$2" ]
then then
# we DON'T HAVE a target directory # we DON'T HAVE a target directory
git clone --template=C:/Users/adve/eh-git $giturl $1 git clone $giturl
else else
# we HAVE a target directory # we HAVE a target directory
git clone --template=C:/Users/adve/eh-git $giturl $2 git clone $giturl $2
fi fi
fi fi
} }