dotfiles/git/scripts/git-github
Joshua Sherman e3a28fd1d9 Updated git github command syntax
Went with the more standard "username/repo" when specifying the repository to use. Makes it easier to copy and paste repo names from the location bar.
2014-01-02 12:22:27 -05:00

11 lines
237 B
Bash
Executable file

#!/bin/bash
# create directory and checkout project from github
# usage: git github joshtronic/bash
DIR=`echo $1 | awk -F '/' '{print $2}'`
git init $DIR
cd $DIR
git remote add origin git@github.com:$1.git
git pull origin master
cd ..