Creating a new remote repo from command line

Is there any git command to create a new remote repo and push my commit to GitHub from there? I know I can just create a new repo on, but if there is a way to achieve this from the CLI that would be great.


Unfortunately, there is no native git command to create a new GitHub repo.  However, not all is lost.  GitHub maintains a command-line wrapper for git called hub which conveniently allows you to create a new GitHub repository from the CLI:

git **create -d "\<commit name\>"**

This will create a new repository called whatever the current directory is named.  If you’re interested, you can find out more about hub here.

I hope that helped!


Thanks for the statement you gave to me i really appreciate that i can learn alot from this business

It returns:

git: ‘create’ is not a git command. See ‘git --help’.

The most similar command is

1 Like

You need to install hub at the link posted above 

Its hub instead of git: 

<font color="#FF0000">hub</font> **create -d "\<commit name\>"**
hub create -d "first commit"