curl -u 'USER' https://api.github.com/user/repos -d '{"name":"REPO"}'
Replace USER
with your username and REPO
with the intended repo name. Include all quotes above.
The do the usual:
git remote add origin [email protected]:USER/REPO.git
git push origin master
function gh-new () {
curl -u 'USER' https://api.github.com/user/repos -d "{\"name\":\"$1\"}"
}
Again, replace USER
when you use it in your own .bash_profile.
usage: $ gh-new repo-name