How to structure multiple projects in Git

2

In the company I work with, we use Visual Studio 2013 and TFVC to version the projects.

I am accustomed to Source Control Explorer , can give Get Latest Version at any level (any repository, a project group, just a project or a specific file ), create Branch and see clearly the "folder" created with the new branch, etc.

The structure of the projects was organized as follows:

- Repositório
  -- Grupo_de_Projetos_1
     --- Projeto_1
         ---- Development
              ----- Source
                    ...
         ---- Main
              ----- Source
                    ...
         ---- Release
              ----- Source
                    ...
      --- Projeto_2
          ...
      --- Projeto_3
          ...

  -- Grupo_de_Projetos_2
    --- Projeto1
        ...

Basically with this structure it was possible to authorize access to the entire repository, a group of projects or even just a specific project. Each project was organized in 3 Branch (Development, Main and Release), all just an exact copy. So the developers worked on Development and then we could do the Merge on Main to then send it to Release . So when a bug appears in production, we resolve directly to Release , publish and then replicate the patch to the other Branchs , and the game follows.

Now it has been decided to move to Git, and I was responsible for the migration, but I'm having a hard time putting together the folder structure (I can already understand the commands and many concepts used).

Looking at my old structure in TFVC , would it be possible to create something similar? (I know that Branchs will no longer be seen in the same way.)

Let's go to the checklist:

  • I already have my repository created, so would it be equivalent to my first level of the structure shown above (-)?
  • My Project_Group_1 (-) would be a "subrepository" or simply a folder? Is it possible to configure access levels to a folder?
  • Would each project (---) be a "subrepository" too, so BranchS could be created or just a folder? Is it possible to create a Branch for a folder only?
  •   

    I've seen a bit about submodule , it might be an option in this   context?

    I was also passionate about this Microsoft tip , would you be able to implement it with Git?

        
    asked by anonymous 21.06.2017 / 23:22

    1 answer

    0
  • Yes, the repository would be the equivalent of your first level

  • No! In Git you have access to the entire repository, you can not download just one folder.

  • I see no reason for you to split projects into repositories or sub-repositories, if they are part of the same Solution, the complexity would only increase. However, the use of a module is interesting if you have a modular architecture, for example, an e-commerce and that in each module of the application stay in the performance of a team, sales, inventory, etc ... You could download only the module of the application relevant to your work.

  • It is possible for you to structure the folders in Git as in this tip from the Microsoft page that you quote. Normally I do:

    • \
    • src
    • doc
    • README.MD

    and within the src (source), I put the structure of the solution, usually AS IS as created by Visual Studio.

        
    22.06.2017 / 13:47