Created
June 22, 2017 17:55
-
-
Save ZeroDeth/abb0fdf895d1786d145d046d475f2bd0 to your computer and use it in GitHub Desktop.
Create a new repo at Github using git bash?
This file contains hidden or 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 | |
# Create a new repo at Github using git bash? | |
reponame="$1" | |
if [ "$reponame" = "" ]; then | |
read -p "Enter Github Repository Name: " reponame | |
fi | |
mkdir ./$reponame | |
cd $reponame | |
# Add a Repository to GitHub using Git Command-line Calls Only? | |
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 [email protected]: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