tags:

views:

65

answers:

3

Do I need to create a repository for each project or just one that encompasses all of the projects in this solution?

+1  A: 

You can go either way depending on your requirements, particularly how the projects are related - If projects are in the same repository it is easier to add references between them. If they are in different repositories it is easier to have different access control settings.

If the projects are in the same solution though you will definitely want a single repository.

Tom Clarkson
+1  A: 

I've worked with Git with a very large project set (200+) in which the application was a group of core projects with a lot of plug-in projects. We used Android's Repo script (http://source.android.com/source/git-repo.html) to help manage them.

It was necessary for us since we had a dozen or so plug-in configurations for different products. It is a pretty slick tool. The major drawback is the lack of documentation for repo and the horrible choice of name (not search friendly).

Brian Clements
+1  A: 

It depends if you are using a lot of shared code via libraries or services. If you are sharing libraries that you need to have at different versions, it's easier to separate them and use git submodules (via git slave, if you like). If you need the libraries to be the latest for all projects (because they access a common data store) you may be ok with one repo.

Separate repos may be easier to do access control, but gitolite is great as it can restrict by branch and many other things.

You can later join repositories and graft histories together via "git rebase --root --onto branch1". Or you can split one into many with git filter-branch.

So I wouldn't sweat it too much. You're using git for a reason. You can change your mind later and still keep the history.

Hope this helps,

Adam

adymitruk