Git Account Switcher
A VS Code / Cursor extension that clears stored GitHub credentials in one click, enabling you to re-authenticate with a different account.
Features
- One-click credential wipe: Clear GitHub credentials from your system's credential store
- Cross-platform support: Works on Windows (Credential Manager), macOS (Keychain), and Linux (git credential store)
- Confirmation dialog: Prevents accidental credential deletion
- Status bar button: Easy access from the VS Code status bar
Usage
- Look for the
$(github) Clear Git Auth button in the VS Code status bar (bottom left, left-aligned)
- Click the button
- Confirm the warning dialog
- GitHub credentials are cleared
- Next git operation (push, pull, fetch) will prompt you to re-authenticate
How It Works
This extension uses platform-specific commands to delete stored credentials:
- Windows:
cmdkey /delete:git:https://github.com
- macOS:
security delete-internet-password -s github.com
- Linux:
echo url=https://github.com | git credential reject
Scope (V1)
This extension does one thing: clear credentials. It does not:
- Store or manage multiple GitHub accounts
- Switch between accounts automatically
- Handle tokens or PATs
- Modify git configuration
These features are planned for V2.
Requirements
- VS Code 1.75.0 or later
- Git installed and configured
- Stored GitHub credentials in your system's credential store
License
MIT
| |