Git,
done right.
# No more committing with the wrong account.
Run multiple GitHub accounts in parallel, or set one up for the first time. One command either way.
brew install aksisonline/tap/gitswitchidentity manager for git
e edit · ? cli tips · 1-3 tabs / click · q quit
you're one login away from done.
No tutorial, no SSH keys to generate by hand, no config files to edit. Install gitswitch, log in once, and you're set up right, first commit or five hundredth.
everything gh auth switch
can't do.
GitHub CLI only manages API tokens. Your commit identity, the name and email baked into every commit, is completely separate. gitswitch handles both.
user.name and user.email globally, instantly, or pin a repo once and it never needs switching again — even across every terminal you open.gh command resolves the right account for its repo on its own — including the ones an AI agent opens for you.gitswitch claude installs a Claude Code skill; gitswitch reauthor fixes commits an agent already made under the wrong identity. Works the same for a human who's brand new to git.gitswitch login: GitHub device flow creates your profile automatically — name, email, GitHub account, token, and an SSH key if you want one.core.sshCommand to force a specific key with IdentitiesOnly=yes, preventing agent fallback — the same key doubles as your signing key.vs gh auth switch
Two tools, two different problems. gitswitch handles what the GitHub CLI intentionally ignores.
| capability | gh auth switch | gitswitch |
|---|---|---|
| github api tokens | ✓ | ✓ (optional) |
| commit name + email | ✗ | ✓ |
| ssh key per identity | ✗ | ✓ |
| gpg signing key | ✗ | ✓ |
| per-repo auto-switch | ✗ | ✓ |
| parallel gh accounts (multi-terminal) | ✗ (one global account) | ✓ (session isolation) |
| interactive TUI (mouse + keyboard) | ✗ | ✓ |
| no runtime deps | ✗ | ✓ (single binary) |
gitswitch plays well with what you have.
You don't have to be starting from zero. Here's how it fits in.
includeIf switches user.name/user.email per directory tree, if you keep repos in a strict folder structure and hand-author each conditional block. Identity awareness does the same job automatically, per repo instead of per folder, then goes further: SSH keys, GPG/SSH signing, gh account, and session isolation across terminals, switched together.~/.ssh/config host aliases and rewriting remotes per account works, but it's manual and per-machine. gitswitch sets core.sshCommand with IdentitiesOnly=yes per profile, same isolation, switched with the rest of your identity in one command.gh auth. gitswitch adds session isolation (each terminal resolves its own gh account, no shared global state), a mouse-driven TUI, gitswitch reauthor to fix commits already made under the wrong identity, and a Claude Code skill for AI agents.up in 30 seconds.
brew install aksisonline/tap/gitswitchcurl -fsSL https://get.gitswitch.dev | bashgo install github.com/aksisonline/gitswitch@latestirm https://get.gitswitch.dev/install.ps1 | iexwhat's next
gitswitch is Go all the way. Here's what's shipping.
Session isolation: any number of terminals, any number of GitHub accounts, no fighting over gh's single global account.
Pins write into the repo: gitswitch pin work sticks for good, without touching your global identity.
GitHub OAuth login: gitswitch login authenticates via device flow, no manual config.
gitswitch reauthor: rewrites author/committer identity on commits already made under the wrong profile.
Multi-host profiles: one profile, multiple GitHub hosts (github.com + github.corp.com), each with its own key and token.
Team presets: gitswitch apply <url> bootstraps all profiles from a shared signed config.
In-repo config: .gitswitch.yaml declares required profiles and identity policies.