Howto setup up a git mirror environment?
As we are slowly moving from SVN to GIT we are looking into creating a cluster of git servers both to offload cloning over our wan, and to create redundancy or a hot standby in case of issues. One of our main demands is that we can commit to any of the gitserver, who would replicate it further up in the hierarchy.
As we develop as in many as 3 continents simultaneously i don't place a lot of trust in using rsync/crontab'ed git clones, as i believe commits on more than one server at the same time might corrupt the repositories (or give git a headache on how to merge the changes) . What is the best practices around such a deployment? Anyone with tips or pointers? Wandisco's SVN cluster does not cut it as we are migrating to开发者_运维技巧 Git.
For such a propagation of data, I would recommend using git bundle
(which would include tags and branches) because:
- you can make incremental bundle easily (after an initial full bundle)
- propagate a bundle means copying one file over the wan
- you can use them to update bare repos at each of your node to serve as local "central" repo (to pull from or push to, since you can't push directly to a bundle)
精彩评论