Soul Reaver
Soul Reaver

Reputation: 2092

Pushing local repository to server

Up till now, I worked on a local repository ( locally initialized, not cloned ). Because I am working on more than one workstation, I decided to "go online" and want to push my repo to server. Also, I want to push all branches.

So question is: Is there any way of pushing whole locally initialized repo ?

Upvotes: 4

Views: 8806

Answers (1)

Cascabel
Cascabel

Reputation: 496782

To make things easier, start by creating a remote if you haven't already:

git remote add origin <server repo url>

Now you can do this:

git push --all

to push all branches to origin, the default remote. (If you name it something else, you'd have to specify it as an argument.)

Upvotes: 6

Related Questions