From here We might have the interesting issue, that there is a central "internal" git server, but we want to automatically synchronize it to some other "external" repository as well.

  • Creating a local bare repository on the central "internal" git server

Look also at the end of the link above for a simpler solution:

git clone --mirror

You might want to add groups and permission stuff before

ssh <user>@
cd /pub/git

Another experiment:

Assume the "internal" git server is here:


Assume the "external" git server is here:


On the "internal" git server we'll checkout the "external" repository:

cd /home/rber/projects/ICOM/qt/try-it-icom/internal-git-server
git clone --bare git://

We must now manually configure the remote branch tracking and then synchronize the repositories:

cd /home/rber/projects/ICOM/qt/try-it-icom/internal-git-server/qt-everywhere-scripts.git
git remote add origin git://
git fetch -v

Automatically synchronize:

git fetch origin
git merge origin