mirror of
https://github.com/captn3m0/Scripts.git
synced 2024-09-27 22:22:53 +00:00
21 lines
327 B
Bash
Executable File
21 lines
327 B
Bash
Executable File
#!/bin/bash
|
|
|
|
if [[ "$1"=="" || "$2"=="" ]]; then
|
|
echo "Run as gitub-init-repo org repo"
|
|
exit 1
|
|
fi
|
|
|
|
|
|
ORG=$1
|
|
REPO=$2
|
|
mkdir $REPO
|
|
pushd $REPO
|
|
touch README.md
|
|
hub create -p $ORG/$REPO
|
|
git init
|
|
git add README.md
|
|
git commit -m "first commit"
|
|
git remote add origin https://github.com/$ORG/$REPO.git
|
|
git push -u origin master
|
|
popd
|