From the course: Working with LinkedIn Learning Exercise Files on GitHub

Clone the repository to your local computer - GitHub Tutorial

From the course: Working with LinkedIn Learning Exercise Files on GitHub

Clone the repository to your local computer

- [Instructor] Working in Visual Studio 2019, the first thing you see when you open Visual Studio is this get started area. And right at the top is the ability to clone a repository. Click here. You have copied the URL from GitHub, so paste that into the repository location, then pick a local hard drive. I'm using this source repos folder. It'll have the folder name that represents the same name of the repository on GitHub. Now click on the clone button. And then in the Solution Explorer after the repository has been successfully cloned, you'll see the solution here, and then there's a master folder. And if you recall from the other chapter, this is an empty branch. So we'll have to switch some branches to see more interesting stuff here. But let's verify that this is the correct location. There's the location, there's the folder name. And then there's a sub folder called Source. And then there's that advanced bugging .sln file. Now you can always find this by right-clicking on the solution and going to Open Folder in File Explorer. And that shows you the location on our hard drive. If you're not using Visual Studio 2019, there are some alternate steps to make this happen. I'll show you Visual Studio 2017 next. In Visual Studio 2017, the actions are done in the Team Explorer. If you don't see this tab, you go to View and then choose Team Explorer. And then you click on Home. That takes you to this page. And then you click on Manage Connections. And then here at the bottom, it says local Git repositories, or we are creating a local Git repository by cloning it. So I want to go here and choose clone, paste in the URL. Pick a location. Earlier in this video, I already used this folder. So let me modify this by adding a -2 on the end of that. So I won't copy over what I already have there. And then I'll choose to recursively clone sub-modules, and then I'll click on Clone. Once we've successfully cloned the repository, you'll switch over to the Solution Explorer. We're currently in the folder view. There are two ways of looking at solutions in Visual Studio. You can look at the folder view, which is where we're looking at the top level folder. This is the new folder I just created. And then there's the Source folder. And then there's the SLN file. And I can use that to load the solution. Or I can switch to the solution view, which is the same view we saw in the Visual Studio 2019. There's the master folder. And you can always switch back and forth by choosing folder view or the solution view. Now that we've seen how to successfully clone the repository, we'll look at how to check out branches.

Contents