Created
November 10, 2015 13:13
-
-
Save OmgImAlexis/b7ca8f5407e3c5579396 to your computer and use it in GitHub Desktop.
Alias to make a github repo and push init commit
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
alias make-github-repo='curl -u "OmgImAlexis:$(PERSONAL_ACCESS_TOKEN)" https://api.github.com/user/repos -d '\''{"name":"'\''$(basename $PWD)'\''"}'\'' && echo "# $(basename $PWD)" >> README.md && git init && git add README.md && git commit -m "init" && git remote add origin "git@github.com:OmgImAlexis/$(basename $PWD).git" && git push -u origin master' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Just replace
$(PERSONAL_ACCESS_TOKEN)
with your Github access token, you'll need public access to repos enabled for it and then drop this in your.bashrc
or.zshrc
file.