How to Clone GitHub Repository in Visual Studio Code (2024 updated)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hi everyone and welcome back in my last video I showed you how to clone a GitHub repository on the command line today I will show you how to clone a GitHub repository directly into vs code without using the command line first I will show you how to do it for a public repository and in the second half of the video I will show you how to do it for your own private repository or collaborator private repository which is just slightly different so stick around for that enjoy so vs code has been becoming very popular over the last few years so you might be interested in cloning GitHub repository directly into vs code instead of on the command line so I'm going to show you how so I'm going to show you how to clone a public repository again just like in the last video on cloning a GitHub repository on the command line and we're going to clone the exact same one so I will also show you how to clone your private repository in vs code later because it's a little bit different but let's start with a public repository so again I'm going to clone je Modas crei repository because it's awesome so let's click on the repository on get up.com so just find the repository you want to clone and thises the repository I want to clone so again just like last time we click on the green button that says code up here and we're going to use the option https again for public repository so this is the URL we want to copy so we click on copy your of the clipboard and it's now copied now we open vs code and all we have to do here is click on Source control on the left so we click here and there's a button saying clone Repository does exactly what we want so I'm going to click on that and here I paste the URL that we just copied hit enter and now I have to choose a folder a destination folder for the repository because it's down going to download it onto my computer so I am going to use the same folder that I created last time here it's called test project it's an empty folder select as repository destination and down here you can see how it's downloading that was very quick and now I can directly open this repository and there it is so I have all the code from this repository just as it is on github.com so now I'm going to show you how to clone your private repository or the repository of a collaborator where you need to link an account you can have account because not everyone is allowed to clone this repository so for that I'm going to open my own repository so let's go to my channel and I created this fake repository just for this purpose so awesome repo I'm going to click on it and again I'm going to click on the green button that says code and here you can see there's more options now there's also the SSH option which is another option that's a little bit more secure for your private repositories that's one option but we're going to use https again for Simplicity and I am going to again copy to clipboard open vs code and do the same thing again Source control clone Repository and paste the URL so careful it's going to be a little bit different from before I have to select a destination I'm going to use the same destination there's the difference I have to now allow Visual Studio code to sign into GitHub so I'm going to click allow here I'm going to authorize Visual Studio code as an authorized extension on my GitHub account authorized I have to enter my password and now I can open Visual Studio code again and it's going to download here and now the Clone repository is here there's nothing in there except the read me file so importantly you just signed into your GitHub and linked your Visual Studio code to your GitHub account and there's now on your GitHub account a section where Visual Studio code is registered as an authorized app and on the other hand you are now with your Visual Studio code linked to that GitHub account so you can click on the little accounts button down here and you see there's a GitHub account that is linked and if you want to unlink you can just sign out here sign out and then maybe you want to clone another repository with a different GitHub account and that's how you can do it if you want to sign out there because in the future if you clone another repository it will assume you're in the same GitHub account so you now know how to clone a GitHub repository directly into vs code if you want to learn how to clone a GitHub repo on the command line check out my video on that in my next video I will show you how to create a repository from scratch clone it into vs code and then push changes to GitHub directly from within vs code stay tuned and see you next time
Info
Channel: Infinite Codes
Views: 1,088
Rating: undefined out of 5
Keywords: visual studio code, how to run github project in visual studio code, how to pull project from github in visual studio code, how to link github to visual studio code, how to commit and push in git using visual studio code, how to connect github to visual studio code, how to use git in visual studio code, how to clone github repository in visual studio, vscode github, github vscode, connect vscode to github, github vscode tutorial, how to clone github repository in vscode, git clone
Id: LfrzGQimd4U
Channel Id: undefined
Length: 4min 40sec (280 seconds)
Published: Thu Mar 21 2024
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.