threads / discuss / 23849

Three-tiered VM development setup with support for branch switching

Subject: Three-tiered VM development setup with support for branch switching

## tl;dr

2 messages between May 20, 2010 and May 20, 2010.

replies: 1people: 2as markdown or json

Burke Cates· May 20, 2010, 00:59 UTC · lore

I read Joe Maller's blog post "A web-focused Git workflow" ( http://joemaller.com/2008/11/25/a-web-focused-git-workflow/ ) and thought this would be a great replacement for our current scm/development workflow at my job, which I won't get into here. My main concern with switching to a three-tiered setup using Git is that switching branches on a workstation and pushing to the "hub" repo would result in no change in the "prime" repo when "hub"'s post-update hook runs, as it will not switch branches. The only solution I can think of involves ripping the branch out of the refspec that is passed to the hook and using that to call checkout and pull (or possibly a checkout -b --track newbranch if I dont have the branch locally on prime). I feel like this is a pretty nasty hack, but I might be missing something completely that would make this sort of setup much easier to pull off. What I'm trying to pull off here is this: devs can code at their workstations with whatever tools they want, and push changes to the VM's with git. Hooks will be used to initiate makes for testing and for pushing changes to other nodes in the test-cluster (who will have the same make hook). The only obstacle at this point is the branch switching.

Ævar Arnfjörð Bjarmason· May 20, 2010, 08:37 UTC · re: Burke Cates · lore

Re: Three-tiered VM development setup with support for branch switching

On Thu, May 20, 2010 at 00:59, Burke Cates <burke.cates@gmail.com> wrote:
Show 12 quoted lines
> The only solution I can think of involves ripping the branch out of
> the refspec that is passed to the hook and using that to call checkout
> and pull (or possibly a checkout -b --track newbranch if I dont have
> the branch locally on prime). I feel like this is a pretty nasty hack,
> but I might be missing something completely that would make this sort
> of setup much easier to pull off.
> What I'm trying to pull off here is this: devs can code at their
> workstations with whatever tools they want, and push changes to the
> VM's with git. Hooks will be used to initiate makes for testing and
> for pushing changes to other nodes in the test-cluster (who will have
> the same make hook). The only obstacle at this point is the branch
> switching.

If I'm not mistaken the plumbing commands like git-commit-tree allow you to make commits without switching branches. I.e. they just record raw data in the repository and don't care about your checkout.

← back to recent threads