Skip to content

Instantly share code, notes, and snippets.

@bonelifer
Forked from Krishna829/createRepo.sh
Created September 3, 2020 19:45
Show Gist options
  • Save bonelifer/5d43937ba79dd7581ce4a71848ac050f to your computer and use it in GitHub Desktop.
Save bonelifer/5d43937ba79dd7581ce4a71848ac050f to your computer and use it in GitHub Desktop.
create github repo
#!/bin/sh
reponame="$1"
if [ "$reponame" = "" ]; then
read -p "Enter Github Repository Name: " reponame
fi
mkdir ./$reponame
cd $reponame
curl -u USERNAME https://api.github.com/user/repos -d "{\"name\":\"$reponame\"}"
git init
echo "ADD README CONTENT" > README.md
git add README.md
git commit -m "Starting Out"
git remote add origin git@github.com:USERNAME/$reponame.git
git push -u origin master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment