Gar*_*ett 2 clone visual-studio-2017
我有一个需要很长时间才能克隆的 TFS git 存储库。有没有办法只在 Visual Studio 中克隆一个分支?
KBe*_*Dev 6
如果您使用的是 Git,则应该使用(在 CMD 或 PowerShell 实例中):
git clone -b branch_name --single-branch 'repo_url'
branch_name是分支的名称,repo_url是远程存储库的链接。
branch_name
repo_url
这将从您的远程存储库中导入一个特定的(单个)分支。据此,您需要知道 Visual Studio 只会读取您的 .git(以及其他 Git 依赖项,如 .gitignore)注册表。
重要提示:这仅适用于 git >=1.7.10 版本。
在此处查看相关的 MSDN 文档页面
还有一个类似的问题在这里
归档时间:
7 年,2 月 前
查看次数:
6248 次
最近记录:
7 年 前