Let’s assume you already have:

  • Visual Studio Code installed
  • A GitHub account set up
  • Git installed on your system I'm working on Ubuntu, but the steps should be similar across other operating systems.

Configure Git (First Time Only)
If you haven’t configured Git with your name and email yet, do it now using the following commands:

git config --global user.name "YOUR NAME"
git config --global user.email "EMAIL ADDRESS"

💡 Tip: If your name or email doesn't contain spaces, the quotes are optional.

Sign in to GitHub from VSCode

  1. Open Visual Studio Code.
  2. Click the account icon in the bottom-left corner.
  3. Select “Sign in to GitHub” from the menu.
  4. A browser window will open with the GitHub authentication page.
  5. Log in and authorize access.
  6. Once authentication is successful, VSCode will be connected to your GitHub account!

Clone an Existing GitHub Repository
If you want to clone a repository that already exists on GitHub:

  1. Go to the repository page on GitHub and copy the URL.
  2. In VSCode, press Ctrl + Shift + P to open the Command Palette.
  3. Select “Git: Clone”.
  4. Paste the copied URL when prompted.
  5. Choose a local directory to save the repository.