Eric Guo's

in HTML5, JavaScript, Ruby & Rails, Python, and Cloud MES!

Setup Mirror Between 2 or More Git Server Using Hooks Script


First make sure the two server can using ssh to login each other, then add remote mirror to bare git repository.

git remote add --mirror=push cvpgitip01 git@

Add hooks post-commit in bare git repository.

exec git push cvpgitip01 -f --mirror