开发者

VS 2010, Git, and a Solution with Multiple Projects

Do I need to cre开发者_如何学JAVAate a repository for each project or just one that encompasses all of the projects in this solution?


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.


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.


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).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜