Sinan
Sinan

Reputation: 5980

How to combine two separate git repositories

I have a local copy a of a web project on a local server. Everything is ok. Works with git and github.

However I have the (almost) same repository on another server. The problem is that repo is initialised with its own git init command and thus the two repos are separate.

Is there any way to sync these?

Upvotes: 1

Views: 134

Answers (1)

Zombo
Zombo

Reputation: 1

I have used this successfully

git remote add upstream git://another-server.com/repo.git
git fetch upstream
git merge upstream/master

Upvotes: 1

Related Questions