{"thread":{"id":"24421","subject":"Git Fetch / updating HEAD","startedAt":"2010-07-17T15:32:47Z","lastAt":"2010-07-17T16:11:13Z","messageCount":3,"participants":["Mahesh Vaidya","Johan Herland"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"145725","messageId":"AANLkTinuK4gx9SG1VKo_NbkP_QWMCmtsfJgUgfoL_KGo@mail.gmail.com","threadId":"24421","inReplyTo":null,"subject":"Git Fetch / updating HEAD","fromName":"Mahesh Vaidya","fromEmail":"forvaidya@gmail.com","sentAt":"2010-07-17T15:32:47Z","receivedAt":"2010-07-17T15:32:47Z","isPatch":false,"sender":{"key":"forvaidya@gmail.com","avatar":null},"body":"Hi,\n\ngit fetch --all --append updates FETCH_HEAD. I'd like this command to\nupdate HEAD as well; is there any flag ?\n\nI have a reason to do it; trying to implement multisite\n\nA (master) -> B (readonly mirror) -> C (workspace)\n\nif sitting in B; git fetch does't update HEAD\n\n\nMahesh Vaidya\n"},{"id":"145727","messageId":"AANLkTilp5lZn99QZPWSkCHStnRdkGx6mMU2IQBvllaU4@mail.gmail.com","threadId":"24421","inReplyTo":"AANLkTinuK4gx9SG1VKo_NbkP_QWMCmtsfJgUgfoL_KGo@mail.gmail.com","subject":"Re: Git Fetch / updating HEAD","fromName":"Mahesh Vaidya","fromEmail":"forvaidya@gmail.com","sentAt":"2010-07-17T15:35:38Z","receivedAt":"2010-07-17T15:35:38Z","isPatch":false,"sender":{"key":"forvaidya@gmail.com","avatar":null},"body":"BTW - I have tried this\ngit  update-ref HEAD  FETCH_HEAD; is this ok ??\n\n\nOn Sat, Jul 17, 2010 at 9:02 PM, Mahesh Vaidya <forvaidya@gmail.com> wrote:\n> Hi,\n>\n> git fetch --all --append updates FETCH_HEAD. I'd like this command to\n> update HEAD as well; is there any flag ?\n>\n> I have a reason to do it; trying to implement multisite\n>\n> A (master) -> B (readonly mirror) -> C (workspace)\n>\n> if sitting in B; git fetch does't update HEAD\n>\n>\n> Mahesh Vaidya\n>\n\n\n\n-- \nThank you and best regards.\nMahesh Vaidya  / 9740500144\nhttp://www.twitter.com/forvaidya\n"},{"id":"145729","messageId":"201007171811.13624.johan@herland.net","threadId":"24421","inReplyTo":"AANLkTilp5lZn99QZPWSkCHStnRdkGx6mMU2IQBvllaU4@mail.gmail.com","subject":"Re: Git Fetch / updating HEAD","fromName":"Johan Herland","fromEmail":"johan@herland.net","sentAt":"2010-07-17T16:11:13Z","receivedAt":"2010-07-17T16:11:13Z","isPatch":false,"sender":{"key":"johan@herland.net","avatar":"https://avatars.githubusercontent.com/u/547031?v=4"},"body":"On Saturday 17 July 2010, Mahesh Vaidya wrote:\n> BTW - I have tried this\n> git  update-ref HEAD  FETCH_HEAD; is this ok ??\n> \n> On Sat, Jul 17, 2010 at 9:02 PM, Mahesh Vaidya <forvaidya@gmail.com> \nwrote:\n> > Hi,\n> > \n> > git fetch --all --append updates FETCH_HEAD. I'd like this command to\n> > update HEAD as well; is there any flag ?\n> > \n> > I have a reason to do it; trying to implement multisite\n> > \n> > A (master) -> B (readonly mirror) -> C (workspace)\n> > \n> > if sitting in B; git fetch does't update HEAD\n\nYou need to set up special refspecs in your B repo, so that git fetch \nupdates refs/heads/* instead of refs/remotes/origin/*. When that is done, a \nsimple 'git fetch' will update your branches (and HEAD as a result).\n\nIn short, you should create the B repo using 'git clone --mirror' (which \nwill set up the correct refspecs for you)\n\n\n...Johan\n\n-- \nJohan Herland, <johan@herland.net>\nwww.herland.net\n"}]}