217k views
5 votes
How to switch github account in vscode

User Mcktimo
by
7.6k points

1 Answer

4 votes

Final answer:

To switch GitHub accounts in VSCode, use the Command Palette with Ctrl+Shift+P to sign out of the current account, then sign in with the new one following the on-screen instructions.

Step-by-step explanation:

To switch GitHub accounts in Visual Studio Code (VSCode), you'll need to sign out of the current GitHub account and sign in with the one you wish to use. Here's a step-by-step explanation:

  1. Open VSCode.
  2. Press Ctrl+Shift+P (Cmd+Shift+P on macOS) to open the Command Palette.
  3. Type 'Sign out' and select 'GitHub: Sign out'.
  4. After signing out, you can press Ctrl+Shift+P again and type 'Sign in' then select 'GitHub: Sign in' or 'GitHub: Sign in with browser'.
  5. You will then be prompted to sign in through the browser or enter your credentials directly in VSCode.
  6. Follow the on-screen instructions to authenticate the new GitHub account.

Once authenticated, you can continue your work in VSCode with the new GitHub account.

User Shami
by
7.8k points