Created
March 3, 2016 08:23
-
-
Save banunatina/0a9ca3ef57282fd7b099 to your computer and use it in GitHub Desktop.
ZSH Script to create a github repo using HTTPS/SSH, set it as the origin, and push to its master branch
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
# This zsh script takes 1 parameter - the repo name. | |
# Remember replace USER with your username! | |
makerepo () { | |
curl -u 'USER' https://api.github.com/user/repos -d \{\"name\":\"$1\"\} | |
# Uncomment the line below to use HTTPS (will prompt for password) | |
# git remote add origin https://github.com/USER/$1.git | |
# Uncomment the line below to use SSH (requires prior setup) | |
# git remote add origin [email protected]:USER/$1.git | |
git push origin master | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment