To connect your GitHub account to Visual Studio Code (VS Code), follow these steps:
-
Install Git:
- You should have a github account on github.com
- Download and install Git from git-scm.com.
- During the installation process, choose the options that suit your preferences. The default options are usually fine.
-
Verify Git Installation:
- Open a terminal or command prompt.
- Type
git --versionand press Enter. You should see the installed Git version.
-
Open VS Code:
- Launch Visual Studio Code on your computer.
-
Install GitHub Extension:
- Click on the Extensions icon in the Activity Bar on the side of the window or press
Ctrl+Shift+Xto open the Extensions view. - In the Extensions view, type
GitHub Pull Requests and Issuesin the search bar. - Click on the install button next to the extension by GitHub.
- Click on the Extensions icon in the Activity Bar on the side of the window or press
- Set Up Git Username and Email:
- Open the terminal in VS Code (View > Terminal or `Ctrl+``).
- Configure your Git username:
git config --global user.name "Your Name" - Configure your Git email:
git config --global user.email "youremail@example.com"
- Sign In to GitHub:
- Open the Command Palette by pressing
Ctrl+Shift+P. - Type
GitHub: Sign in to GitHuband select it. - Follow the prompts to sign in to your GitHub account. You may need to authorize VS Code to access your GitHub account.
- Open the Command Palette by pressing
By following these steps, you should be able to connect your GitHub account to VS Code and manage your repositories efficiently.