Question:
At the company I work for, we use Visual Studio 2013 and TFVC for project versioning.
I'm used to the Source Control Explorer , being able to get the Latest Version at any level (the entire repository, a group of projects, just a project or a specific file), create Branch and clearly see 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 into 3 Branches (Development, Main and Release), all just an exact copy. So the developers worked at Development
and then we could Merge into Main
and then send it to Release
. So, when a bug appears in production, we fix it directly in Release
, publish it and then replicate the fix to the other Branchs , and the game goes on.
Now it's been decided to move to Git, and I'm responsible for the migration, but I'm having difficulties to assemble 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 like that? (I know that Branches 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 (-)?
- Would my Project_Group_1 (–) be a "subrepository" or simply a folder? Would it be possible to configure access levels to a folder?
- Each project (—) would be a "subrepositório" too, to be able to be created the Branchs or just a folder? Is it possible to create a Branch for just one folder?
I saw a little bit about submodule , would it perhaps be an option in this context?
I was also in love with this Microsoft tip , would it be possible to implement it with Git?
Answer:
-
Yes, the repository would be the equivalent of your first level
-
No! In Git you have access to the entire repository, you can't download just one folder.
-
I don't see any reason for you to divide 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 is in the performance of a team, sales, inventory, etc… You could only download the modules application pertinent to your work.
It is possible for you to structure folders in Git as in this tip on the Microsoft page you mention. Usually I do:
- \
- src
- doc
- README.MD
and inside the src (source), I put the solution structure, usually AS IS as created by Visual Studio.