scripts/github-init-repo

21 lines
327 B
Plaintext
Raw Normal View History

2019-11-17 03:58:29 +00:00
#!/bin/bash
2020-05-02 13:38:46 +00:00
if [[ "$1"=="" || "$2"=="" ]]; then
echo "Run as gitub-init-repo org repo"
exit 1
fi
2019-11-17 03:58:29 +00:00
ORG=$1
REPO=$2
mkdir $REPO
pushd $REPO
touch README.md
2020-05-02 13:38:46 +00:00
hub create -p $ORG/$REPO
2019-11-17 03:58:29 +00:00
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