At Contoso, a platform team maintains a shared logging library in its own Git repository in Azure Repos. Three product teams each work in their own separate repository and want to reuse the logging library. Management requires that every team keeps its own repository; the repositories must not be merged.
For each of the following statements, select Yes if the statement is true. Otherwise, select No.
| Statement | Yes | No |
|---|---|---|
| Adding the logging library's repository as a Git submodule places the library as a folder inside each product team's repository. A submodule embeds a separate Git repository in a parent repository, where it appears as a folder. Each product repository therefore gets the library as a folder, and all the repositories remain separate, as management requires. | Correct | |
| When a product team adds the library as a submodule, Git records the submodule's URL in a file named .gitignore. Adding a submodule makes Git write the submodule's details, including its URL, to a text file named .gitmodules. The .gitignore file is not where Git stores this information. | Correct | |
| Publishing the logging library to a centralized package registry lets the product teams consume it as a shared dependency consistently across their projects. The cross-repository sharing guidance recommends a central package registry or artifact store. The platform team publishes the shared library there once, and every project consumes the same dependency in a uniform way, while each team keeps its own repository. | Correct |
The teams must keep separate repositories, so they need a cross-repository sharing mechanism rather than consolidation. A Git submodule brings the shared library's repository into each consuming repository as a folder. Git keeps the submodule's details, including its URL, in a .gitmodules file, not in .gitignore. As an alternative, the platform team can publish the library to a central package registry so that every project consumes the same shared dependency consistently.