Git – Team switching from TFS Source Control to TFS with Git, not sure how to handle complex project structure

gitteam-foundation-server

I've used git for my personal projects for years, but that's always working alone, not needing to branch much, etc.
Our development team at work has decided we are definitely switching to git, and as one of the most experienced git user on the team I have the task of figuring out our project structure.

Our current structure has a single Source Control, with many Projects. Those source control "projects" may contain multiple folders which contain multiple Visual Studio Solutions which can contain multiple Visual Studio Projects, some of which are shared.
An example:

  • Main Directory
    • Folder 1
      • Solution 1
        • Project 1
        • Shared Project 1
    • Folder 2
      • Solution 2
        • Project 2
        • Project 3
      • Solution 3
        • Project 4
        • Shared Project 1
        • Shared Project 2
    • Folder 3
      • Solution 4
        • Shared Project 1
        • Shared Project 2

I am not sure at all how to translate this to git properly. The main concern that has been mentioned to me is that if we use git submodules, when checking in changes it has to be applied to multiple repositories. Is there a way around this? Does TFS in Visual Studio handle this in an easy to manage way?
Anyone have any good information about this kind of thing?

Best Answer

It depends on how closely coupled the modules are. And mainly how closely coupled they are in organizational terms.

All modules developed by the same team in context of the same project (in management sense of the word) should probably go in one repository, especially if it's possible that a logical change will span more than one of them.

Modules that are developed separately, they should live in separate repositories. But than there should also be at least semi-formal release process for providing the results of one project to the other. Not because of git but to reduce communication overhead especially when a bad commit in one project would affect many people in other projects.

Git will happily work with hundreds of thousands of files. It will work if you split or if you don't. So the decision to split is organizational. You want some barrier between teams so mistakes don't affect too many people and you want reasonably small teams to limit the communication overhead (20 people is rather large team).

Related Topic