1. Open Visual Studio Code terminal (Ctrl + `)
  2. Write the Git clone command. For example,

    git clone https://github.com/angular/angular-phonecat.git
    
  3. Open the folder you have just cloned (menu File → Open Folder)

Answer from Shahdat on Stack Overflow
🌐
Visual Studio Code
code.visualstudio.com › docs › sourcecontrol › github
Work with GitHub in VS Code
October 7, 2026 - When you run the Open Repository command, you then choose whether to open a repository from GitHub, open a Pull Request from GitHub, or reopen a repository that you had previously connected to.
Discussions

Using github and VS Code?
Step by step tutorials: https://vscode.github.com/ More on reddit.com
🌐 r/webdev
23
16
May 8, 2024
Using Github with VS Code
Are you pushing your commits? More on reddit.com
🌐 r/learnprogramming
7
1
March 21, 2024
How to link my VScode to Github?
I forgot how to do it in the UI but go to your empty repo in the browser, copy the SSH path, crack open the terminal in VSCodr and type git remote add origin SSH_PATH replacing SSH_PATH with what you copied. This is telling git locally to add a remote called origin (conventional name for the default origin). Then you should be able to commit and push in the UI. More on reddit.com
🌐 r/github
5
0
September 9, 2025
How to open my repository from Github on Visual Studio Code?
https://docs.github.com/en/repositories/creating-and-managing-repositories/cloning-a-repository More on reddit.com
🌐 r/github
1
2
June 5, 2022
People also ask

Do I need to install Git separately before connecting VS Code to GitHub?
Yes. Visual Studio Code does not include Git. Install Git separately on your computer, then verify the installation by running 'git --version' in the integrated terminal.
🌐
tms-outsource.com
tms-outsource.com › home › how to connect to a github repository from vs code
How to Connect to a GitHub Repository From VS Code
Does VS Code have built-in GitHub support?
Yes. Visual Studio Code includes built-in Git integration through the Source Control view. For GitHub-specific features such as pull request management, issue tracking, and code reviews, you can install the official GitHub Pull Requests and Issues extension.
🌐
tms-outsource.com
tms-outsource.com › home › how to connect to a github repository from vs code
How to Connect to a GitHub Repository From VS Code
How do I clone a GitHub repository directly inside VS Code?
Open the Command Palette with Ctrl+Shift+P, run the 'Git: Clone' command, paste the repository URL, choose a local destination folder, and Visual Studio Code will clone and open the repository.
🌐
tms-outsource.com
tms-outsource.com › home › how to connect to a github repository from vs code
How to Connect to a GitHub Repository From VS Code
🌐
Microsoft Learn
learn.microsoft.com › en-us › azure › developer › javascript › how-to › with-visual-studio-code › clone-github-repository
GitHub Repositories in Visual Studio Code for JavaScript - JavaScript on Azure | Microsoft Learn
If you're asked to sign into GitHub, complete the sign-in process. Enter azure-samples/js-e2e-express-server in the Repository URL field. Select (or create) the local directory into which you want to clone the project then select Select as ...
🌐
It's FOSS
itsfoss.com › vs-code-github
How to Connect GitHub to VS Code [Step by Step]
February 10, 2025 - You should not need to install any extension for cloning repos and pushing your changes. Go to the source code tab from the left sidebar. You should see a 'Clone Repository' or 'Publish to GitHub' (if you have opened a folder already) option.
🌐
TMS Outsource
tms-outsource.com › home › how to connect to a github repository from vs code
How to Connect to a GitHub Repository From VS Code
August 26, 2026 - This guide covers 3 connection methods: HTTPS with a Personal Access Token, SSH key authentication, and the GitHub Pull Requests extension. Each method suits a different situation.
🌐
Reddit
reddit.com › r/webdev › using github and vs code?
r/webdev on Reddit: Using github and VS Code?
May 8, 2024 -

Hey everyone!

I know i’m going to sound pretty stupid for this but i’ve looked all over youtube and all of the videos are from years ago or don’t really explain it well in my opinion. Can someone here explain to me in the most basic terms how to use github and vs code together so that i’m able to access my code from both my laptop and desktop

update: thank you so much everyone! i was able to figure it out

Find elsewhere
🌐
Straygoat
straygoat.co.uk › freelance technical writer › blog › set up git and github to work with visual studio code
Set up Git and GitHub to work with Visual Studio Code - Straygoat
July 27, 2025 - Use Select as Repository Destination to confirm your choice. VS Code will download (clone) the repo to that folder. When prompted, click Open to open the folder in Visual Studio Code. If you're not using VS Code and want to clone a GitHub repo using just the command line:
🌐
Visual Studio Code
code.visualstudio.com › docs › sourcecontrol › repos-remotes
Working with repositories and remotes
November 3, 2021 - To browse repositories on GitHub, select Clone from GitHub, sign in when prompted, and choose a repository from the list. Cloning a public repository by URL doesn't generally require signing in.
🌐
DEV Community
dev.to › kougou › how-to-connect-vscode-to-github-1nip
How to Connect VSCode to GitHub - DEV Community
April 8, 2025 - Go to the repository page on GitHub and copy the URL. In VSCode, press Ctrl + Shift + P to open the Command Palette. Select “Git: Clone”. Paste the copied URL when prompted. Choose a local directory to save the repository.
🌐
GitHub
github.blog › home › developer skills › github for beginners: getting started with git and github in vs code
GitHub for Beginners: Getting started with Git and GitHub in VS Code - The GitHub Blog
May 25, 2026 - It looks like two files on top of each other. Click the Open Folder button. In the file explorer, select a folder that has some code you want to upload to GitHub, and click Open. After opening your code, select the Source Control icon.
🌐
TechRepublic
techrepublic.com › home › developer
How to add a GitHub repository to VS Code
February 9, 2024 - Click Sign In, and a pop-up will open informing you Visual Studio Code wants to sign in using GitHub. Click Allow, and your default browser will open. If you’ve not already signed in to your GitHub account, do so.
🌐
GitProtect.io
gitprotect.io › strona główna › github with visual studio code guide
GitHub with Visual Studio Code Guide - Blog | GitProtect.io
January 19, 2022 - Go to the Source Control panel, and click on the “Clone Repository” button. Then, when you select the Clone from GitHub, you’ll be asked to enable a sign-in attempt. Click on “Allow” to this git commands and proceed with authentication.
🌐
Graphite
graphite.com › guides › how-to-push-code-from-vscode-to-github
How to push code from VS Code to GitHub - Graphite
Visit GitHub and sign in. Click on the "New" button under the "Repositories" tab. Enter your repository details and create the repository. Connect your local repository to your GitHub repository:
🌐
Visual Studio Code
code.visualstudio.com › docs › sourcecontrol › quickstart
Quickstart: use source control in VS Code
November 3, 2021 - Open the Command Palette (⇧⌘P (Windows, Linux Ctrl+Shift+P)) and run Publish to GitHub. Sign in when prompted and return to VS Code. Enter an available repository name, such as git-practice, and choose a private repository for this exercise.
🌐
Reddit
reddit.com › r/learnprogramming › using github with vs code
r/learnprogramming on Reddit: Using Github with VS Code
March 21, 2024 -

I'm sorry if these are silly questions but I've been pulling my hair out and trying to find solutions online with no luck.

So let me just preface by saying I don't know a lot about Git and Github. I've read up on them so theoretically I think I get what they are. Git hub is a version control file repository website/server(?) where you can store your code and changes you make to it. You can also use it to collaborate.

Git is version control system which comes with a command line language (?)and can be used with many version control systems including Github. So now, I have an account with Github and I do my coding in VS Code. I have a project I was working on and every time I changed something significant I would go to source control and commit changes to the repository on my git hub. I am able to access all these versions when using vs code, however when I log in to my git hub account using a web browser. I have all the repositories I have made bu t they don't contain anything, they are empty.

I don't really get how to have these files that are on my workstation to be automatically linked with Git. My goal is to have some kind of portfolio to showcase some of the projects I've been working on. But I seem to be missing some basic or fundamental knowledge for me to use Git Hub in this way.

Please help me

Edit: Made my description for Git clearer(?) lol...idek if I did that

Edit2: Solved! Thanks !

🌐
Medium
thecokerdavid.medium.com › how-to-set-up-github-with-visual-studio-code-817fb30f44e2
How to set up GitHub with Visual Studio Code | by David Coker | Medium
October 6, 2021 - An authorization screen should pop up, simply accept and enter your GitHub password, then you’d be redirected back to VSCode. Select the directory where you want the repo to be ‘cloned’ and simply follow the guided prompt. You should see a prompt asking if to open the repository folder, but if you didn’t see it, then you could alternatively select the ‘File’ shortcut to the far left, and click on ‘Open Folder’ and navigate to the folder which your cloned repo is stored and ‘Confirm’.
🌐
Reddit
reddit.com › r/github › how to link my vscode to github?
r/github on Reddit: How to link my VScode to Github?
September 9, 2025 -

I tried for like 30 minutes to push my project i just created from VScode to Github and i couldn't get it right for the life of me, i ended up just going to "add file" and dragging the folder there.

I got the following erros:

"fatal: The current branch main has no upstream branch."

"fatal: No configured push destination."

"fatal: repository not found".

I do have a SSH key on my github, how can i link it to my vscode to fix these problems?

🌐
Techielass
techielass.com › how-to-push-code-from-vs-code-to-github
How to push code from VS Code to GitHub
October 23, 2025 - Select all the files you want to include in this commit and enter a descriptive commit message. Then, hit commit to save your changes. ... Head over to GitHub.com in your browser and create a new repository.
🌐
Visual Studio Code
code.visualstudio.com › blogs › 2021 › 06 › 10 › remote-repositories
Remote Repositories
November 3, 2021 - Clone Repository in Container Volume: Clone the current repo in a Docker container volume using the Dev Containers extension (you'll need the Dev Containers extension and Docker installed). VS Code will reload and connect using Dev Containers, and the remote indicator will now read Dev Container: {image name}. Open in Codespaces: Continue your work in a GitHub Codespace.