-1

Is it possible to create a new project and push that new project to GitHub rather than having to open your browser, log into Github, and create a new project for you to push to via the GitHub site?

Benoît Latinier
  • 1,952
  • 2
  • 22
  • 32
PositiveGuy
  • 43,266
  • 106
  • 285
  • 457

4 Answers4

2

Technically you can. But you need to use the API's that are provided by Github

There is also a wrapper written in python which has all of those implemented: Check it out here

Alexander Ejbekov
  • 4,330
  • 22
  • 24
0

No.

You will always have to create your repository first in GitHub.

budhajeewa
  • 1,830
  • 1
  • 12
  • 18
0

You can't. Github is a wrapper to git and it does not allow you to do that. The reason for that is that in github repos have github rights which can't be manage via git.

Here is the same question: How to create a new repo at Github using git bash?

An alternative might be to use github API: https://developer.github.com/v3/repos/#create

Community
  • 1
  • 1
Benoît Latinier
  • 1,952
  • 2
  • 22
  • 32
0

You can add it to your .bash_profile:

echo 'mkrepo () { curl -u "<username>" https://api.github.com/user/repos -d "{\"name\":\"$@\"}" ; }' >> ~/.bash_profile

source ~/.bash_profile

Then enter mkrepo <new-repo-name> an it'll create it. (<username> is your username on github and <new-repo-name> is what you want to call the new repository.

woodchuck
  • 1
  • 2