How to clone a specific branch from 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.
All I can do is to clone the master first and choose the specific branch from there.
There seems to be only one route to get a branch via VS. It cannot be done directly but there is a simple path.
- Get the address of the main branch from the repo. Forget about branches at this point.
- Tell VS that you want to clone an existing repo.
- Give VS the git repo address – it’s in the paste buffer so just paste it into the repo location field. Set repo destination. Start clone operation.
- Observe VS complete operation. (If credentials are already correct.)
- Switch to desired branch – in this example it’s dev.
That’s it. Hope that helps.
Answered By – Scott Howard