In my company we have a base software that gets customized for every client. Today using SVN we have a setup like this:
/trunk
/tags
…
/branches
/client_project_x
/client_project_y
/client_project_z
How would be the best way do organize this in git? Have a remote repository for each project and one for base code or having a big remote repo with several branches?
If we use a big remote repo with several branches, there’s a way to clone just one branch from a remote repository?
Conceptually, there is no difference between multiple branches in one repository and branches in multiple repositories. The whole point of DVCS is to remove that distinction. You want to think of it in terms of the people who need to access and control any given branch. If it’s common to every developer to access code from every client, then it’s going to be easier to put them all in one central repo. You can pick which branches you want cloned or not, although cloning an entire repo is the easiest. If you need to have very different access permissions in different branches, it’s preferable to create separate repos for them.
In other words, set it up in whichever way makes it easier for the development and test teams.