Eric Park
Eric Park

Reputation: 502

Do I always need to create a repository outside the terminal for Github and Bitbucket?

Whenever I start a project, I am told to create a corresponding repository on bitbucket and on github. I am wondering do I always need to make this repository outside of my terminal?

I am wondering because what is the logic behind this? Is it to ensure that I create both a local and remote repository?

Is it possible to create a remote repository within the terminal? Is that recommended?

Upvotes: 0

Views: 30

Answers (2)

pohlman
pohlman

Reputation: 331

You must always create the remote repository on the site (or via the site's API as previously stated) to be able to push to it, however you can always add the remote location to an already existing local project.

$ git remote add origin {remote repository URL}

See: Adding an existing project to GitHub using the command line

Upvotes: 0

Massey101
Massey101

Reputation: 346

It is possible to create a remote repository using the corresponding API, eg: https://developer.github.com/v3/.

However, the hosting services github and bitbucket are separate tools and entities to git and mercurial and they have designed their services mostly around the web browser. This is probably why people say to use the website, that's how it has been designed and that's how you will get the best user experience.

Upvotes: 1

Related Questions