Created
October 14, 2019 14:57
-
-
Save Krishna829/9d09f43f8b97e567222933e7efb91cc8 to your computer and use it in GitHub Desktop.
create github repo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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