From e3a28fd1d9febf1927b91b010b362a98268082a3 Mon Sep 17 00:00:00 2001 From: Joshua Sherman Date: Thu, 2 Jan 2014 12:22:27 -0500 Subject: [PATCH] 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. --- git/scripts/git-github | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/git/scripts/git-github b/git/scripts/git-github index b2a0cfb..d9b46a5 100755 --- a/git/scripts/git-github +++ b/git/scripts/git-github @@ -1,9 +1,11 @@ #!/bin/bash # create directory and checkout project from github -# usage: git github joshtronic bash +# usage: git github joshtronic/bash -git init $2 -cd $2 -git remote add origin git@github.com:$1/$2.git +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 ..