简体   繁体   English

Visual Studio 中的 Git 多个存储库

[英]Git multiple repositories in Visual Studio

I have a solution with five projects in it and want to add it under Git source control.我有一个包含五个项目的解决方案,并希望将其添加到 Git 源代码控制下。

Since I want to limit access for some users to some projects, I have to set up a Git repository for each project and limit access on repository-level.由于我想限制某些用户对某些项目的访问,我必须为每个项目设置一个 Git 存储库并限制存储库级别的访问。

In Visual Studio however, Git repositories are created per-solution with sub-folders for each project it contains.然而,在 Visual Studio 中,Git 存储库是针对每个解决方案创建的,其中包含它包含的每个项目的子文件夹。 Is there a possibility to map each project to a separate Git repository in Visual Studio?是否有可能将每个项目映射到 Visual Studio 中的单独 Git 存储库? If not, how would I achieve my goal in any other way?如果没有,我将如何以其他方式实现我的目标?

Try using Git submodules .尝试使用Git 子模块

You could have a solution repository with the project repositories as submodules.您可以拥有一个以项目存储库作为子模块的解决方案存储库。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM