To start with, first, we need to have Visual Studio 2019 installed and a valid server URL. Cloning is the process of downloading or copying a repository to the destination location from the server/source. Cloning projects with Visual Studio 2019 in the Solution Explorer is very easy. Before starting the cloning process, we must have an existing repository that points out our repository on the server. Every server has its own unique repository URL.
- Visual Studio 2019 (Download from here).
- Any server account like TFS, GIT, BitBucket, etc.
Open Visual Studio 2019
Go to the Start menu on your Windows desktop and type Visual studio 2019; open it.
Clone and Checkout Code
The Visual Studio 2019 screen will pop up, which contains four boxes on the right side.
- Clone or checkout code.
- Open a project or solution.
- Open a local folder.
- Create a new project.
From the above options, we need to click on the “Clone and checkout code” box, which opens a new window and will ask for the repository location and local path.
Set Repository Location and Path
- Now, copy or type your repository location into “Code repository location” and select a physical path where you want to clone the project. [Note: Folder must be empty. ]
- Click the “Clone” button.
Sign in to Your Account
- Now, it is time to enter your valid credentials to finish the cloning process.
- Click on the “Next” button.
If all the steps were performed correctly, your cloning process starts. As you can see in the below image, it displays the live result of how much is left to download and what the speed is per second.
Wait for the process to finish. Once the process is completed, you can commit your code, compare files, and get the latest files from the server with the history-tracking mechanism.
In this article, I explained how we can clone a project easily using Visual Studio 2019.
I hope this article will be helpful and useful to someone. Please give your valuable feedback and share it with your friends so they can also learn.