{"thread":{"id":"23849","subject":"Three-tiered VM development setup with support for branch switching","startedAt":"2010-05-20T00:59:50Z","lastAt":"2010-05-20T08:37:45Z","messageCount":2,"participants":["Burke Cates","Ævar Arnfjörð Bjarmason"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"141933","messageId":"AANLkTinQJLsS6N_d2hsfwbibEuKiUHi9FAnrb5K4Frih@mail.gmail.com","threadId":"23849","inReplyTo":null,"subject":"Three-tiered VM development setup with support for branch switching","fromName":"Burke Cates","fromEmail":"burke.cates@gmail.com","sentAt":"2010-05-20T00:59:50Z","receivedAt":"2010-05-20T00:59:50Z","isPatch":false,"sender":{"key":"burke.cates@gmail.com","avatar":null},"body":"I read Joe Maller's blog post \"A web-focused Git workflow\" (\nhttp://joemaller.com/2008/11/25/a-web-focused-git-workflow/ ) and\nthought this would be a great replacement for our current\nscm/development workflow at my job, which I won't get into here. My\nmain concern with switching to a three-tiered setup using Git is that\nswitching branches on a workstation and pushing to the \"hub\" repo\nwould result in no change in the \"prime\" repo when \"hub\"'s post-update\nhook runs, as it will not switch branches.\nThe only solution I can think of involves ripping the branch out of\nthe refspec that is passed to the hook and using that to call checkout\nand pull (or possibly a checkout -b --track newbranch if I dont have\nthe branch locally on prime). I feel like this is a pretty nasty hack,\nbut I might be missing something completely that would make this sort\nof setup much easier to pull off.\nWhat I'm trying to pull off here is this: devs can code at their\nworkstations with whatever tools they want, and push changes to the\nVM's with git. Hooks will be used to initiate makes for testing and\nfor pushing changes to other nodes in the test-cluster (who will have\nthe same make hook). The only obstacle at this point is the branch\nswitching.\n"},{"id":"141939","messageId":"AANLkTilIhuE06gVSO8cM_iLtixxBUX7DxrSlUbaCvmUs@mail.gmail.com","threadId":"23849","inReplyTo":"AANLkTinQJLsS6N_d2hsfwbibEuKiUHi9FAnrb5K4Frih@mail.gmail.com","subject":"Re: Three-tiered VM development setup with support for branch switching","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2010-05-20T08:37:45Z","receivedAt":"2010-05-20T08:37:45Z","isPatch":false,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"On Thu, May 20, 2010 at 00:59, Burke Cates <burke.cates@gmail.com> wrote:\n> The only solution I can think of involves ripping the branch out of\n> the refspec that is passed to the hook and using that to call checkout\n> and pull (or possibly a checkout -b --track newbranch if I dont have\n> the branch locally on prime). I feel like this is a pretty nasty hack,\n> but I might be missing something completely that would make this sort\n> of setup much easier to pull off.\n> What I'm trying to pull off here is this: devs can code at their\n> workstations with whatever tools they want, and push changes to the\n> VM's with git. Hooks will be used to initiate makes for testing and\n> for pushing changes to other nodes in the test-cluster (who will have\n> the same make hook). The only obstacle at this point is the branch\n> switching.\n\nIf I'm not mistaken the plumbing commands like git-commit-tree allow\nyou to make commits without switching branches. I.e. they just record\nraw data in the repository and don't care about your checkout.\n"}]}