DEV Community

Beatrice
Beatrice

Posted on

Create a new repo from your command line

Assumptions

  • You have the Github CLI installed
  • You've set up your Github username, password, SSH keys etc on your machine

Command

curl -u USERNAME:PASSWORD https://api.github.com/user/repos -d '{"name":"REPO NAME"}'
Enter fullscreen mode Exit fullscreen mode

That's it! You can create a new repository in your command line this way. Then, perform git remote add origin git@github.com:USERNAME/REPONAME.git like you always do, and push your work. :)

Top comments (0)