{"thread":{"id":"21742","subject":"What is the best way to synchronize two *bare* repositories with each other?","startedAt":"2009-11-24T21:19:27Z","lastAt":"2009-11-25T10:14:20Z","messageCount":2,"participants":["Liebich, Wolfgang","Alex Riesen"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"128262","messageId":"7FF082147E322048955113B6CB87A7C0081731C659@MCHP058A.global-ad.net","threadId":"21742","inReplyTo":null,"subject":"What is the best way to synchronize two *bare* repositories with each other?","fromName":"Liebich, Wolfgang","fromEmail":"wolfgang.liebich@siemens-enterprise.com","sentAt":"2009-11-24T21:19:27Z","receivedAt":"2009-11-24T21:19:27Z","isPatch":false,"sender":{"key":"wolfgang.liebich@siemens-enterprise.com","avatar":null},"body":"Hi,\nLet's say I have two bare git repositories, bareA and bareB.\nI also have a third non-bare repo, lets call it workA. Coworkers also have their working repositories, they all\nsynchronize back to repoA.\nMy work repo can only synchronize directly with repoB.\nWhat is the best way to keep repoA and repoB synchronized to each other?\n\nI solved that by defining (in the \"config\" file of repoB) a remote section for repoA,\nand I \"fetch\" from repoA by issuing \"git remote update repoA\", and I push back via\n\"git push --all repoA\".\n\nThis strange setup is necessary because of the security setup (my home development machine is not directly\nconnected with the company intranet).\n\nIs this a good way to solve that problem, or are there better methods?\n\nCiao,\n- Wolfgang"},{"id":"128292","messageId":"81b0412b0911250214nb97f997h686a10622fbf3e01@mail.gmail.com","threadId":"21742","inReplyTo":"7FF082147E322048955113B6CB87A7C0081731C659@MCHP058A.global-ad.net","subject":"Re: What is the best way to synchronize two *bare* repositories with each other?","fromName":"Alex Riesen","fromEmail":"raa.lkml@gmail.com","sentAt":"2009-11-25T10:14:20Z","receivedAt":"2009-11-25T10:14:20Z","isPatch":false,"sender":{"key":"raa.lkml@gmail.com","avatar":"https://avatars.githubusercontent.com/u/324101?v=4"},"body":"On Tue, Nov 24, 2009 at 22:19, Liebich, Wolfgang\n<wolfgang.liebich@siemens-enterprise.com> wrote:\n> Hi,\n> Let's say I have two bare git repositories, bareA and bareB.\n> I also have a third non-bare repo, lets call it workA. Coworkers also have their working repositories, they all\n> synchronize back to repoA.\n> My work repo can only synchronize directly with repoB.\n> What is the best way to keep repoA and repoB synchronized to each other?\n\nTake a look at \"--mirror\" option of \"git clone\" (it sets up a remote\nwith references\nmapping like this: refs/*:refs/*).\n"}]}