cron - How to have synchronize two git bare repositories? -
is possible clone git bare repo new bare repo ? example:
- git init --bare mainrepo.git
then in remote server:
- git clone --bare xxx@server:/path/mainrepo.git reporeplica.git
and cron job send changes reporeplica.git mainrepo.git, can have 2 teams working, 1 directly mainrepo.git , second reporeplica.git
is possible ? , how ?
it possible, suggest synchronisation process to:
- not use cron
- use post-receive hook can push has been receive other repo
- limit synchronization 1 branch
- use different branches
meaning:
repo1
pushmaster
repo2
master_fromrepo1
git push repo2 master:master_fromrepo1
repo2 push
master
torepo1
master_fromrepo2
git push repo1 master:master_fromrepo2
Comments
Post a Comment