views:

216

answers:

3

I am using Git for a Visual Studio solution. Here is the structure of the sol.

myProject.Domain, myProject.Common, myProject.Core, webClientForCustomer1, webClientForCustomer2

As the names imply, webClient projects all depend on Domain, Common and Core projects. I create a new web client app for each customer and make UI customizations. I add new features to other three projects, so web client projects must be updated with the new features.

What is your suggestion to model my repository into branches?

+3  A: 

"model my repository into branches?"

That sound dangerously close to the "Subversion cheap copy" representation of branches. Submodules are much better suited for identifying different group of files.

A branch is, especially in Git or other VCS for which "branch" is a first-class citizen, a way to isolate your work from other parallel work.
Creating branches is not something you do because you have myProject.xxx directories, but because you want to isolate your development effort from other activities (like maintaining your current application, making a fix, doing a refactoring, and so on)

Plus, with Git, there is also the notion of publication (to other Git repositories).
Jakub Narębski has an excellent post on that issue

VonC
I don't think I am alone in not liking the way SVN does things, but if you have been using it for a while, git will take a bit of getting used too, but well worth it of course!
Chris Huang-Leaver
A: 

I'm not sure branching is what you want. I'd consider one repo for your frameworks, and a repo each for your clients. Then I'd use Git Submodules to link your framework into the client project, just like it really lived there. Check the Git User's Manual chapter 8 for more

Ball
A: 

Have you considered using submodules rather than branches for your Domain, Common and Core projects?

From the git submodules man page:

Submodules allow foreign repositories to be embedded within a dedicated subdirectory of the source tree, always pointed at a particular commit.

Tim Henigan