From the course: Visual Studio Developer Tips

Clone the GitHub repo to your developer computer - Visual Studio Tutorial

From the course: Visual Studio Developer Tips

Clone the GitHub repo to your developer computer

- [Instructor] During this course, I'll show code examples in some of the videos. This is a weekly series which means I'll be adding tips as the year progresses. To ensure the code is up-to-date, I'll post the sample code on GitHub. That means if you want to follow along, you need to clone my repo on your computer. If you are new to Git or GitHub, I recommend you watch some of our Source Control courses on our website. Since this a Visual Studio tips course, I suggest you watch my Source Control course, the one shown at the top of this webpage. The GitHub chapter has lots of examples on the GitHub integration in Visual Studio. Don't worry if you don't have time right now to explore these courses. I'll show you the basics of cloning the GitHub repo in this video. If you are a Git veteran, then you can skip the rest of this intro movie. First stop on the tour is to go to GitHub and find my public repo. On the GitHub website, go to my section and then we're looking for this repo, VisualStudio.WeeklyTips. Click on the Clone or download button and then click here to copy the URL for the repo to your Clipboard. Now that you copied the URL to the Clipboard, it's time to look at how to clone the remote repo to your local computer. Today I'm looking at how to do that from within Visual Studio. There are other approaches you can take, like using the Git command line or using other third-party tools. In Visual Studio, open Team Explorer. If you don't see the Team Explorer tab, go to View, Team Explorer. Then click on the Connection button. At the bottom of the screen, you'll see all your local Git repositories. We don't have one for the Visual Studio Weekly Tips yet. It's not showing up on the list so I want to clone that by clicking here on this Clone hyperlink. Paste in the URL and you'll see that Visual Studio is suggesting a location for your local repository. It's in your default location. In my case, it's Users\WR\Source\Repos and then it's creating a subfolder called VisualStudio.WeeklyTips. I'll allow it to recursively clone the sub-modules and then I'll click on the Clone button. Now I'll switch over to the File Explorer and look in that same location and you can see that under my Repos folder, there's now a new folder here that contains the code from the remote repository.

Contents