While the git cli is expansive, it does not support creating new remote repositories directly from the terminal. Ref: forum post
We can however use hub to solve this slight annoyance..
-
Install hub via your preferred package manager, instructions here
-
Initialize a new git repo locally
cd mkdir my-new-repo; cd my-new-repo git init
-
add some content, stage file and commit
touch yello.md git add -A git commit . -m "init"
-
create new repo on remote
hub create #This will create a new repository on remote with name: my-new-repo git push --set-upstream origin master #push to remote
Head over to github and check out your new repo: https://github.com
Cheers!