Every repo gets the right GitHub identity.
gitswitch keeps your commit author, GitHub CLI account, SSH key, and signing identity aligned with the repo you’re in. Run work, personal, and AI-agent sessions side by side—without flipping one shared account back and forth.
brew install aksisonline/tap/gitswitchidentity manager for git
e edit · ? cli tips · 1-3 tabs / click · q quit
Git and GitHub don’t share one identity setting.
gh auth switch changes the account used by GitHub CLI. Git keeps your commit name and email separately, while SSH and commit signing use their own keys.
When you work across accounts, switching one setting can leave another behind. gitswitch brings them together in a profile and applies the right identity for each repo.
Side by side. Still yours.
Pin each repo once. With session isolation enabled, each terminal’s GitHub commands use that repo’s account. Here’s an example with work and personal profiles already set up.
$ gitswitch pin work
$ git config user.email
you@company.com
$ gh api user --jq .login
work-account$ gitswitch pin personal
$ git config user.email
you@personal.dev
$ gh api user --jq .login
personal-accountA router, not a credential vault. Your keys stay in ~/.ssh/, your tokens stay in your OS keychain. gitswitch decides which identity applies to the repo you’re in. Read how it works →
Your identity follows the repo.
gitswitch pin work. Your name and email stay with that repo, even if your global Git identity is different.gh commands for the repo you’re working in. Keep work and personal sessions open at the same time—without one terminal changing the account another uses.gitswitch reauthor to rewrite the author and committer on commits that already exist. Review shared history before rewriting it.gitswitch claude can install the Claude Code skill.Log in. Pin a repo. Keep working.
- Log in once.
gitswitch loginhands off togh auth loginand creates your profile—no token to copy into another tool. - Add your identities. Set the name and email for each profile; attach SSH or signing keys if you use them.
- Pin a repo. Run
gitswitch pin workin a repo. Then keep usinggitandghas usual.
Start with one repo.
core.sshCommand and IdentitiesOnly=yes, alongside the rest of that profile.Get gitswitch.
The Go CLI from gitswitch.dev for parallel GitHub identity isolation. Pick the install method for your platform.
brew install aksisonline/tap/gitswitchcurl -fsSL https://get.gitswitch.dev | bashgo install github.com/aksisonline/gitswitch@latestirm https://get.gitswitch.dev/install.ps1 | iex