EasilyBaffled
EasilyBaffled

Reputation: 3882

Creating remote repository out of local ones, Pycharm

I may be asking a dumb question, but I have yet to find a solution online. Using Pycharm, I have found how to create a local repository out of a regular project, but how do I then send that to github as a new remote repository? Is it possible for Pycharm to create remote repositories out of my local stuff, or do I have to pull down an existing repository before I can work remotely?

Upvotes: 5

Views: 4735

Answers (2)

The NetYeti
The NetYeti

Reputation: 353

In the newer version of PyCharm (3.0+ - even the community version), after making as local branch you can easily use the push dialog to create the branch on the remote repo. Just select the checkbox at the bottom labeled "Push current branch to alternative branch" and the settings to the right should already reflect the branch you have created. Then just click the "Push" button. Done.

Upvotes: 2

Alex Ionescu
Alex Ionescu

Reputation: 191

You would need to log into github.com and create a new repository. The URL of the remote repository will be in the form of:

https://github.com/<username>/<reponame>

Then you need to tell Pycharm that the remote for your project is at that URL. I haven't used that IDE before so I can't give you exact steps but in the terminal it would be something like

git remote add origin <url>

You would be telling git to add a remote called "origin" at the url specified. Then after you have made some local commits you can push them with

git push origin master

That means that you want git to push your local branch master to the remote defined by origin which is the url you defined above. Pycharm probably has a GUI to define those remotes and then you'll be able to push to them once you created them on github.com

Upvotes: 6

Related Questions