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 push master repo2 master_fromrepo1

    git push repo2 master:master_fromrepo1 
  • repo2 push master to repo1 master_fromrepo2

    git push repo1 master:master_fromrepo2 

Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -