GitFlip — Git Account Switcher
Work with multiple GitHub / Bitbucket accounts without ever pushing as the wrong one.
If you juggle a work account, a personal account, and a client account or two, your git identity lives in four places that all have to agree:
- the SSH key used to push and pull,
- the ssh config host alias baked into the remote URL,
- the active
gh CLI account (which also drives HTTPS credential helpers),
- the repo's
user.email / user.name stamped on every commit.
Get any one of them wrong and you push under the wrong name, commit with the wrong email, or stare at Permission denied (publickey). GitFlip bundles all four into one account profile and switches them together — per project, in one click.
Features
- Status bar indicator — always shows which account the current repo uses; turns yellow when the repo drifted or has no account yet. Click to switch.
- Accounts sidebar — every account with its avatar, commit email and CLI state. Hover for one-click use, test the SSH connection, copy the public key, or manage the account.
- Guided account setup — a full-page form that generates a modern ed25519 key for you, shows exactly what was created and where, walks you through adding the public key to GitHub/Bitbucket, and verifies the connection — no terminal, no docs-diving.
- Import your existing setup — detects the identities already in
~/.ssh/config and adopts them, keeping your current aliases so nothing breaks.
- Per-project auto-switch — assign an account to a repo once; GitFlip re-applies remote URL, commit identity and CLI login whenever anything drifts, and adopts repos whose remote already uses one of your aliases.
- Projects overview — see every repo → account mapping at a glance; jump to any project in a new window.
How switching works
For the repo you're in, GitFlip:
- rewrites
origin to git@<host-alias>:owner/repo.git, so the right SSH key is always used — no ssh-agent juggling;
- sets local
user.email and user.name;
- runs
gh auth switch so terminal gh and HTTPS operations match;
- remembers the project → account mapping and re-applies it automatically from then on.
Safe by design
- Your hand-written
~/.ssh/config is never edited — GitFlip manages its own file at ~/.gitflip/ssh_config, pulled in via a single Include line (your original config is backed up first).
- Removing an account never deletes key files.
- Everything is plain, inspectable text: accounts and mappings live in
~/.gitflip/config.json.
Requirements
git and OpenSSH (ssh, ssh-keygen) — preinstalled on macOS/Linux, included in Windows 10+ and Git for Windows.
- GitHub CLI (
gh) — optional, needed only for switching the terminal's active GitHub session.
Tips
- Clone under a specific account by using its alias (shown in each account's details):
git clone git@github.com-johndoe:owner/repo.git
- Commands are also in the palette: GitFlip: Switch Account for Current Repo, Add Account, Import Existing SSH/gh Accounts.
Notes
- Bitbucket accounts get SSH key + commit identity management; there is no Bitbucket equivalent of
gh auth switch.
- Primarily developed and tested on macOS; Windows/Linux supported by design — please report anything that misbehaves.
| |