Quickly switch between multiple GitHub accounts from the VS Code status bar.
- Status bar indicator — shows the currently active GitHub account
- Quick switch — click the status bar or use the command palette
- Auto-detect — detects which account is active based on the current repo's
git config - gh CLI integration — optionally runs
gh auth switchalongside git config changes - Add/remove accounts — manage accounts directly from VS Code
- Install the extension
- Run "GitHub Account Switcher: Add GitHub Account" from the command palette
- Enter a label, git name, email, and optionally your GitHub username
- Repeat for additional accounts
Or configure manually in settings.json:
{
"githubAccountSwitcher.accounts": [
{
"label": "Work",
"name": "Ben Work",
"email": "ben@work.com",
"ghAccount": "ben-work"
},
{
"label": "Personal",
"name": "Ben",
"email": "ben@personal.com",
"ghAccount": "ben-personal"
}
]
}| Command | Description |
|---|---|
GitHub Account Switcher: Switch GitHub Account |
Pick an account to switch to |
GitHub Account Switcher: Add GitHub Account |
Add a new account interactively |
GitHub Account Switcher: Remove GitHub Account |
Remove an existing account |
| Setting | Default | Description |
|---|---|---|
githubAccountSwitcher.accounts |
[] |
List of GitHub accounts |
githubAccountSwitcher.switchGhCli |
true |
Also run gh auth switch when switching |
- Sets
git config user.nameandgit config user.emailin the current workspace - If
switchGhCliis enabled andghAccountis set, runsgh auth switch --user <username>