Eric Guo's

Hoping writing JS, Ruby & Rails and Go article, but fallback to DevOps note

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