- Open Visual Studio Code terminal (Ctrl + `)
Write the Git clone command. For example,
git clone https://github.com/angular/angular-phonecat.gitOpen the folder you have just cloned (menu File → Open Folder)

Using github and VS Code?
github - How do I connect to my existing Git repository using Visual Studio Code? - Stack Overflow
How to connect my GitHub Enterprise Account with Visual Studio Code - Stack Overflow
What's the best way to setup VSCode with my GitHub? Is the idea to have all my code local and then periodically push it to GitHub? Sorry, very beginner question
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
- Open Visual Studio Code terminal (Ctrl + `)
Write the Git clone command. For example,
git clone https://github.com/angular/angular-phonecat.gitOpen the folder you have just cloned (menu File → Open Folder)

Another option is to use the built-in Command Palette, which will walk you right through cloning a Git repository to a new directory.
From Using Version Control in VS Code:
You can clone a Git repository with the Git: Clone command in the Command Palette (Windows/Linux: Ctrl + Shift + P, Mac: Command + Shift + P). You will be asked for the URL of the remote repository and the parent directory under which to put the local repository.
At the bottom of Visual Studio Code you'll get status updates to the cloning. Once that's complete an information message will display near the top, allowing you to open the folder that was created.
Note that Visual Studio Code uses your machine's Git installation, and requires 2.0.0 or higher.
I have set it up in the vscode settings like so:

Then it asked for my personal access token. This is token can be created under "settings" -> "developer options" see: https://docs.github.com/en/enterprise-server@3.4/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token
2026 update (VSCode version 1.108.0):
If you have the GitHub Actions extensions installed go to Settings>Extensions>GitHub Actions and there you will see the checkbox "Use-enterprise" (obviously for this to work the enterprise URI has to be configured as shown above under relevant extension, it could have been renamed to "GHE.com & GitHub Enterprise Server Authentication"). For the changes to take effect, restar VSCode, next time you're asked to login you should be redirected to your enterprise login.
Here's what worked for me on vs code 1.62.3.
Clone the GitHub Enterprise repo outside of vs code (ie, using git cli in a terminal or GitHub Desktop).
In vs code, open the folder containing the cloned repo.
And just like magic, it works. If you click on the source control tab in vs code, you can pull changes and make commits. Actually, it might not work quite yet if your cloned project doesn't have your personal access token saved. If you need to do that, you can find instructions in this answer to a different question