Clone an existing Git repo
Cloning an existing repo creates both a copy of the source code for you to work with and all the version control information so Git can manage the source code.
Get the clone URL to your repo
Before you can clone an existing repo, you'll need a URL that points to the existing repo. This URL represents the source of the repo you're going to copy.
If you're using Azure Repos, Azure DevOps Server 2019, or Team Foundation Server, you can find this clone URL in the web portal.
1.From your web browser, open the team project for your Azure DevOps organization and choose Repos, then Files.
2.Select Clone in the upper right.
If you need to clone a GitHub repo, you'll need to get the clone URL. Use the Clone or download button while viewing the repo on the web in GitHub.
Other Git providers have similar buttons in their user interface to get the clone URL.
Copy this URL into the clipboard or store it in a place where you can find it easily. You can't clone a repo without a clone URL.
Cloning an Azure Git Repo
In Visual Studio, to clone and use an Azure Git repo, you have to connect to the team project. In the Team Explorer window of Visual Studio, click the Manage Connections toolbar icon and then click Manage Connections and Connect to a Project.
A dialog window will appear, and you can select or add a Microsoft account or organization account that has access to the Azure DevOps organization. Then you can expand the Azure DevOps organization and see the team projects. Expand your team project and select the Git repo. Provide a local path to clone the repository and click the Clone button.
Clone from another Git provider
If you aren't using Azure Repos, you can still clone your repo in Team Explorer and work with your code in Visual Studio.
1.In Team Explorer, open the Connect view, as explained above.
2.Select Clone under Local Git Repositories and enter the URL for your Git repo. Your team or Git hosting provider gives you this URL.
3.elect a folder where you want your cloned repo.
4.Select Clone to clone the repo.