0

Note: This is not a duplicate of these questions:
Create a new GitHub repository
How to publish Github repository

I could see that "GitHub Desktop" has the feature to publish a new local repository into GitHub without manually create a new repository in GitHub.

enter image description here

How can I achieve the same using commands?

In other words, how to publish a new repository without opening a browser?

From this article, we see the requirement to use the browser for Step 1 and Step 7.

Is this possible only for GitHub Desktop since it is a first-party application?

P.S: Looking for a solution without using GitHub APIs. Any git command is fine.

Abhimanyu
  • 11,351
  • 7
  • 51
  • 121
  • You can't do this through git, but can through the GitHub API: https://docs.github.com/en/free-pro-team@latest/rest/reference/repos#create-a-repository-for-the-authenticated-user – jonrsharpe Jan 15 '21 at 12:05
  • @jonrsharpe, Thanks for the confirmation. I am aware of the GitHub API. Just wanted to make sure that was the only approach. Happy to accept this as an answer if you could post it as one. – Abhimanyu Jan 15 '21 at 12:08
  • You can use [`hub`](https://stackoverflow.com/a/35125094/7976758) or [`gh`](https://stackoverflow.com/a/61460192/7976758) command line utilities (that are convenient wrappers over Github API). https://stackoverflow.com/search?q=%5Bgithub%5D+create+repository+command+line – phd Jan 15 '21 at 15:54

0 Answers0