Created
October 1, 2018 12:42
-
-
Save jezman/a6c9a6c93f651b8b84ac6e08303e82ed to your computer and use it in GitHub Desktop.
Create blank repo on github via bash
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
#!/usr/bin/env bash | |
curl -XPOST -H "Authorization: token $GITHUB_TOKEN"\ | |
https://api.github.com/user/repos -d "{\"name\":\"$1\"}" | |
mkdir ~/github/$1 | |
cd ~/github/$1 | |
echo "# $1" >> README.md | |
git init | |
git add README.md | |
git commit -m "first commit" | |
git remote add origin [email protected]:jezman/$1.git | |
git push -u origin master |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment