A powerful VS Code extension that helps developers seamlessly switch between multiple GitHub accounts for commits and pushes. Never commit with the wrong identity again!
- GitHub Authentication: Sign in with real GitHub accounts using VS Code's built-in authentication for full push/pull access
 - Beautiful Sidebar Panel: Dedicated Activity Bar view with minimalist dark theme and intuitive UI
 - Rich Account Manager: Full-featured webview manager with add/edit/delete capabilities
 - One-Click Account Switching: Switch between multiple GitHub accounts instantly
 - Status Bar Integration: Always see your current Git identity at a glance
 - Smart Auto-Detection: Automatically detects and displays your current Git configuration
 - Automatic Credential Management: Configures git credentials automatically when using authenticated accounts
 - Workspace-Specific Configuration: Git configuration is set per workspace, keeping your projects organized
 - Repository Management: Built-in repository viewer with changes, branches, and commits
 - Contributions Graph: Visualize your GitHub contributions calendar
 - GitHub Notifications: View and manage your GitHub notifications
 - Quick Clone: Clone repositories and automatically switch to the appropriate account
 - Secure Token Storage: Uses VS Code's secure secret storage for all tokens
 
- Open VS Code
 - Press 
Ctrl+Shift+X(orCmd+Shift+Xon Mac) to open Extensions - Search for "GitShift"
 - Click Install
 
Or install via command line:
code --install-extension mikeeeyy04.gitshift- Download the 
.vsixfile from the Releases page - In VS Code, go to Extensions view (
Ctrl+Shift+X) - Click the 
...menu (top right) - Select "Install from VSIX..."
 - Navigate to and select the downloaded 
.vsixfile 
- Open a Git repository in VS Code
 - Click the GitShift icon in the Activity Bar (left sidebar)
 - Click "Sign In with GitHub"
 - Authorize VS Code when prompted
 - Your account is added automatically with full authentication!
 - Switch to it and start pushing immediately ๐
 
- Create a GitHub Personal Access Token with 
repo,user:email,read:user, andworkflowscopes - Open a Git repository in VS Code
 - Click the GitShift icon in the Activity Bar
 - Click "Add/Replace GitHub Token"
 - Paste your token
 - Your account is automatically added and ready to use!
 
- Open a Git repository in VS Code
 - Create a 
.vscode/github-accounts.jsonfile in your workspace root - Add your GitHub accounts:
 
[
  {
    "label": "Work Account",
    "name": "John Doe (Work)",
    "email": "john.doe@company.com"
  },
  {
    "label": "Personal Account",
    "name": "John Doe",
    "email": "john.personal@gmail.com"
  }
]Method 1: Sidebar Panel (Recommended)
- Click the GitShift icon in the Activity Bar
 - Click on any account in the list to switch instantly
 - Current account is highlighted with a checkmark
 
Method 2: Command Palette
- Press 
Ctrl+Shift+P(orCmd+Shift+Pon Mac) - Type "GitHub: Switch Account"
 - Select your desired account from the list
 
Method 3: Status Bar
- Click on the account name in the status bar (bottom left)
 - Select your desired account from the list
 
- Sidebar: Open the GitShift sidebar to see the current account highlighted
 - Status Bar: Your current account is always displayed in the status bar
 - Command: Run "GitHub: Show Active Account" from the Command Palette
 
- Add Account: Click "Sign In with GitHub" or "Add/Replace GitHub Token"
 - Delete Account: Click the trash icon next to an account in the sidebar
 - Edit Account: Edit the 
.vscode/github-accounts.jsonfile directly 
Each account in .vscode/github-accounts.json must have:
label(required): Display name shown in the picker (e.g., "Work Account")name(required): Full name for git commits (e.g., "John Doe (Work)")email(required): Email address for git commits (e.g., "john.doe@company.com")username(optional): GitHub username (added automatically when signing in)authenticated(optional): Whether the account has authentication enabled
[
  {
    "label": "Work Account",
    "name": "Alice Smith",
    "email": "alice@company.com",
    "username": "alice-company",
    "authenticated": true
  },
  {
    "label": "Personal Account",
    "name": "Alice Smith",
    "email": "alice@personal.com",
    "username": "alice-personal",
    "authenticated": true
  },
  {
    "label": "Open Source",
    "name": "Alice Smith (OSS)",
    "email": "alice@opensource.dev"
  }
]- Workspace Configuration: Accounts in 
.vscode/github-accounts.jsonare workspace-specific - Global Tokens: GitHub tokens are stored securely and accessible across all workspaces
 - Auto-Import: The extension automatically imports tokens from other workspaces
 
This extension provides the following commands (accessible via Ctrl+Shift+P). Search for "GitShift" to see all commands:
GitShift: Sign In with GitHub- Sign in with a real GitHub account (full authentication)GitShift: Switch Account- Opens the account picker to switch accountsGitShift: Show Active Account- Displays your current Git identityGitShift: Import Active Session from VS Code- Import existing GitHub sessionsGitShift: Add/Replace GitHub Token- Add or replace a Personal Access TokenGitShift: Remove GitHub Token- Remove token from an accountGitShift: Link to GitHub- Link an existing manual account to GitHub authenticationGitShift: Open Configuration File- Opens the.vscode/github-accounts.jsonfile
GitShift: Repository Quick Clone & Switch- Clone a repository and switch to appropriate accountGitShift: Clone Repository...- Clone a Git repositoryGitShift: Initialize Repository- Initialize a new Git repository in the current workspace
GitShift: Pull- Pull changes from remoteGitShift: Push- Push changes to remoteGitShift: Sync- Sync with remote (fetch + merge)GitShift: Fetch- Fetch changes from remoteGitShift: Pull (Rebase)- Pull with rebaseGitShift: Push (Force)- Force push to remote (use with caution)GitShift: Checkout to...- Switch to a different branchGitShift: Create Branch...- Create a new branchGitShift: Delete Branch...- Delete a branchGitShift: Merge Branch...- Merge a branch into current branchGitShift: Rebase Branch...- Rebase current branch onto another branchGitShift: Stash Changes- Stash current changesGitShift: Pop Stash- Apply the most recent stashGitShift: View Stashes- View all stashesGitShift: Discard All Changes- Discard all uncommitted changesGitShift: Amend Last Commit- Amend the last commitGitShift: Undo Last Commit- Undo the last commit (keeps changes staged)
GitShift: Add Remote...- Add a new remote repositoryGitShift: Remove Remote...- Remove a remote repositoryGitShift: View Remotes- View all configured remotes
GitShift: Refresh Sidebar- Refresh the GitShift sidebarGitShift: Refresh- Refresh the current viewGitShift: More Actions...- Show additional Git operations menuGitShift: Open GitHub Profile- Open your current account's GitHub profile in browserGitShift: Refresh Contributions- Refresh the contributions graphGitShift: Show Git Output- Show Git command output channel
- Activity Bar Icon: Click the account icon in the left sidebar
 - Account List: See all your accounts with visual indicators
 - Current Account: Highlighted with a checkmark and badge
 - Quick Actions: Switch, add, or delete accounts directly from the sidebar
 
- Changes Tab: View staged and unstaged changes
 - Branches Tab: See all local and remote branches
 - Commits Tab: Browse recent commit history
 - Quick Actions: Pull, push, sync, and more Git operations
 
- GitHub Contributions Graph: Visualize your contribution calendar
 - Profile Information: See your GitHub profile and stats
 - Public & Private Repos: View contributions from both (with proper scopes)
 
When you sign in with GitHub, the extension:
- Uses VS Code's built-in GitHub authentication provider
 - Fetches your GitHub username, email, and profile information
 - Stores the access token securely using VS Code's Secret Storage API
 - Configures git credentials automatically for push/pull operations
 - Sets your git user.name and user.email for the current workspace
 - You can push/pull immediately without additional setup!
 
For manual accounts, the extension sets:
git config user.name "Your Name"
git config user.email "your.email@example.com"These settings are stored in .git/config in your workspace and only affect the current repository. Your global Git configuration remains unchanged.
Note: Manual accounts only set the commit author. You'll need SSH keys or Personal Access Tokens configured separately for authentication.
The extension automatically:
- Activates the first available account when opening a workspace
 - Selects an account with repository access when possible
 - Validates token authenticity on startup
 - Syncs account information across workspaces
 
- VS Code: Version 1.90.0 or higher
 - Git: Must be installed and accessible from the command line
 - Internet Connection: Required for GitHub authentication and API calls
 - GitHub Account: Required for authenticated features
 
Make sure you have a Git repository initialized in your workspace:
git init- Verify 
.vscode/github-accounts.jsonexists in your workspace root - Check that the JSON is valid (use a JSON validator)
 - Ensure each account has 
label,name, andemailfields - Try refreshing the sidebar or reloading the window (
Ctrl+RorCmd+R) 
- Try running the "GitHub: Show Active Account" command
 - Reload the VS Code window (
Ctrl+RorCmd+R) - Check if you're in a Git repository
 
- Verify Git is installed: 
git --version - Ensure Git is in your system PATH
 - Check workspace folder permissions
 - For authenticated accounts, verify your token has the correct scopes (
repo,user:email,read:user,workflow) 
- Verify your token has the required scopes:
repo- Full control of private repositoriesuser:email- Access user email addressesread:user- Read user profile dataworkflow- Update GitHub Action workflowsnotifications- Access notifications (optional)
 - Try removing and re-adding the token
 - Check if the token has expired
 
- Check VS Code version (requires 1.90.0+)
 - Open the Output panel and select "GitShift" from the dropdown
 - Check for error messages
 - Reload the window: 
Ctrl+R(orCmd+Ron Mac) 
Contributions are welcome! Please feel free to submit a Pull Request.
We have a comprehensive Contributing Guide that covers:
- How to set up your development environment
 - Coding standards and best practices
 - How to submit bug reports and feature requests
 - The pull request process
 
Quick Start:
- Fork the repository
 - Create your feature branch (
git checkout -b feature/AmazingFeature) - Make your changes and test them
 - Commit your changes following our commit guidelines
 - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
 
Please read CONTRIBUTING.md for complete details.
This project is licensed under the MIT License - see the LICENSE file for details.
The MIT License allows commercial use, modification, and distribution. Please maintain proper attribution when using this code. See LICENSE for full details.
If you find GitShift helpful and want to support its development, consider buying me a coffee!
Your support helps keep this project maintained and improved! ๐
Found a bug or have a feature request? Please open an issue on GitHub.
Developed to solve the common problem of managing multiple GitHub identities in VS Code.

