Creating a new remote repo from command line #21675
-
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 github.com, but if there is a way to achieve this from the CLI that would be great. |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments
-
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:
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! |
Beta Was this translation helpful? Give feedback.
-
Thanks for the statement you gave to me i really appreciate that i can learn alot from this business |
Beta Was this translation helpful? Give feedback.
-
It returns: git: ‘create’ is not a git command. See ‘git --help’. The most similar command is |
Beta Was this translation helpful? Give feedback.
-
You need to install hub at the link posted above |
Beta Was this translation helpful? Give feedback.
-
Its hub instead of git:
|
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
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:
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!