From: Andreas Ericsson Date: Thu, 27 Jan 2011 20:09:39 GMT Subject: Re: Project- vs. Package-Level Branching in Git Message-ID: <4D41D103.4080502@op5.se> In-Reply-To: <14F4737F-E8E4-4E4E-A625-16CA63CF9EFF@shaggyfrog.com> On 01/27/2011 08:38 PM, Thomas Hauk wrote: > Back when I worked at a large games company, we used Perforce, and > our repo structure looked a little something like this: > > /branches /alpha /beta /mainline /packages /external /foolib /1.0 > /1.1 /2.0 /internal /barlib /dev /1.0 /2.0 /bazlib /2.34 /2.35 /qux > /dev > > At the package level, we would split up packages/libraries into two > groups based on if they were developed at the company or not > (external/internal), and inside each one, we might have multiple > versions. In the example above, the repo is for the "qux" game, which > uses an internal "bazlib" library developed by another group, and the > "barlib" library which was developed for use on "qux" and may be used > simultaneously on other projects. > > Project-level branches took mainline as a base and branched into the > /branches directory. Package-level branches would usually take the > "dev" version (which represented the current development version, > akin to "master" in Git) as a base and branch into the same parent > directory but with an actual version name. > > I've successfully used this repo structure with several other > projects over the years at other companies (who were mostly using > Subversion). Now I'm trying to get into the Git swing of things, but > it seems to be that Git only offers project-level branching, and > doesn't allow for the kind of package-level branching I'm describing > here. > > Am I incorrect or is there a way to accomplish with Git what I was > doing before with P4 and SVN? > You're correct. There's no way to accomplish what you wish to do inside git. I'd suggest submodules, but that still doesn't get you the per-directory branching inside a git repository, even though it does make it rather trivial to change versions at will. -- Andreas Ericsson andreas.ericsson@op5.se OP5 AB www.op5.se Tel: +46 8-230225 Fax: +46 8-230231 Considering the successes of the wars on alcohol, poverty, drugs and terror, I think we should give some serious thought to declaring war on peace.