Visual Studio Code (VSCode) is a code editor that helps you to develop, run and debug code with built-in syntax highlighting, code completion and commit features.
In this post, I will show how you create, clone and work with your Github repository in VSCode.
Install Visual Studio Code
- If you have not already done so, install VS Code.
- If you wish, you can also take the additional steps to set-up VSCode with Python.
Install and Activate Git and Github
Before you can use Git and Github in VSCode, you need to :
- Create a Github account;
- Install Git on your computer.
If you want detailed instructions on how you can create and set-up Git and Github, read how to install and set-up Git in VSCode.
If you know how, you can also just go to Git Download location.
Create a Github Repository
Next, you need to create a Github repository. You can do so by following one of these tutorials:
Clone Your Repository in VSCode
Now it is time to clone your Github Repository with VSCode.
To clone your repository, you need to copy the web URL linked to your repository on Github and clone the repo.
Go to your Github Repository, Click on the <> Code
button, and Copy the URL
Go in Visual Studio Code.
Open the command palette. Press Ctrl+Shift+P
(Windows), or Command+Shift+P
(Mac). This will replicate what you would do from the command line.
Type Git: Clone
.
Add the URL that you copied earlier.
Select the repository location where you want your file to be cloned (folder on your desktop).
A small prompt window will pop-up in the bottom right of your screen saying: “Would you like to open the cloned repository?”. Click on “Open”.
Go to your working folder, your repository should be cloned.
Open the Project in VSCode
If you have not opened the newly created project in VSCode when you were ask if you wanted to open the repository earlier, now it is time to do it.
Click on File
> Open
, go to the cloned repository and click on “Open”.
Conclusion
Congratulations, you have cloned your first Github repository from VSCode. You are now ready to learn how to push code from Visual Studio Code to Github.
Other Version Control with Git and Github Posts
Learn Git and Github (Complete Guide)
Get Started With Github
Basics of Version Control
SEO Strategist at Tripadvisor, ex- Seek (Melbourne, Australia). Specialized in technical SEO. Writer in Python, Information Retrieval, SEO and machine learning. Guest author at SearchEngineJournal, SearchEngineLand and OnCrawl.