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.
This commit is contained in:
parent
a1b96fd106
commit
e3a28fd1d9
1 changed files with 6 additions and 4 deletions
|
@ -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 ..
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue