[英]How to clone a specific branch from new git Visual Studio 2019 (not from command)?
How to clone a specific branch from git Visual Studio 2019?如何从 git Visual Studio 2019 克隆特定分支? I know how to do it in command but not sure how to di it using new git in Visual Studio 2019.我知道如何在命令中执行此操作,但不确定如何在 Visual Studio 2019 中使用新的 git 进行操作。
All I can do is to clone the master first and choose the specific branch from there.我所能做的就是先克隆master,然后从那里选择特定的分支。
While using Git, its advisable to use a CMD or PowerShell instance.在使用 Git 时,建议使用 CMD 或 PowerShell 实例。 Can you try:你能试一下吗:
git clone -b branch_name --single-branch 'repo_url'
branch_name is the name of your branch, and repo_url is the link of your remote repository (repository location). branch_name是您的分支的名称, repo_url是您的远程存储库的链接(存储库位置)。
If you want to get it done through the UI:如果你想通过 UI 完成它:
If you click on different branches, the URLs will be different.如果您单击不同的分支,则 URL 会有所不同。 For example now I selected constraints-2-0 and as you can see the URL at the top has changed.例如,现在我选择了constraints-2-0 ,你可以看到顶部的 URL 发生了变化。
There seems to be only one route to get a branch via VS.似乎只有一种途径可以通过 VS 获得分支。 It cannot be done directly but there is a simple path.它不能直接完成,但有一个简单的路径。
That's it.而已。 Hope that helps.希望有帮助。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.