v0.5.0 · written in go
Every repo gets the right GitHub identity.
Commit author, gh account, SSH key, and signing key, matched to the repo you’re in. Run work and personal side by side.
$
brew install aksisonline/tap/gitswitch
✦ Gitswitch
identity manager for git
identity manager for git
Accounts·Utilities·Settings
Current aksisonline · user@gmail.com
· default user@default.com
❯ ✓ aksisonline user@gmail.com
· work user@company.com
↑↓ navigate · enter switch · p pin · a add
e edit · ? cli tips · 1-3 tabs / click · q quit
e edit · ? cli tips · 1-3 tabs / click · q quit
hover or tab to interact · try 1-3 ↑↓ ↵
the problem
Git and GitHub don’t share one identity setting.
gh auth switch only changes the GitHub CLI account. Your commit name, email, SSH key, and signing key live elsewhere. gitswitch bundles them into one profile per repo.
two terminals · two identities
Side by side. Still yours.
Pin each repo once. Each terminal’s gh commands use that repo’s account.
work · ~/work/api
$ gitswitch pin work
$ git config user.email
you@company.com
$ gh api user --jq .login
work-accountpersonal · ~/personal/site
$ gitswitch pin personal
$ git config user.email
you@personal.dev
$ gh api user --jq .login
personal-accountA router, not a credential vault. Keys stay in ~/.ssh/, tokens in your OS keychain. Read how it works →
features
Your identity follows the repo.
[01]
Your identity follows the repo.
gitswitch pin work once. Name and email stay with that repo, whatever your global config says.[02]
Use multiple GitHub accounts at once.
Each terminal resolves
gh for its own repo. No terminal changes another’s account.[03]
Match the right SSH and signing keys.
Attach SSH and GPG keys to a profile. They switch with it.
[04]
Fix a commit made under the wrong identity.
gitswitch reauthor rewrites author and committer on existing commits. Careful with shared history.[05]
Works in your terminal—and agent-launched shells.
Same behavior in your shell, editor, or coding agent.
gitswitch claude installs the Claude Code skill.how it works
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.
already have a Git setup?
Start with one repo.
[if]
Using includeIf?
Keep it, or pin repos one by one instead of hand-maintaining directory rules.
[ssh]
Using SSH host aliases?
gitswitch can select a profile’s SSH key with
core.sshCommand and IdentitiesOnly=yes, alongside the rest of that profile.[cli]
Already using another switcher?
Start with one repo. Add other profiles and session isolation when you need them.
install
Get gitswitch.
$
brew install aksisonline/tap/gitswitch$
curl -fsSL https://get.gitswitch.dev | bash$
go install github.com/aksisonline/gitswitch@latest$
irm https://get.gitswitch.dev/install.ps1 | iexfaq
Questions, answered.
$ Do I need multiple GitHub accounts?
No. gitswitch can also set up Git and GitHub CLI for your first commit.
$ Does gitswitch replace GitHub CLI?
No. gitswitch adds repo-aware identity and session management around your existing Git and GitHub CLI workflow.
$ Do I need to create SSH keys by hand?
No. Add a key to a profile if you want to use one; you can also start without configuring one.
$ Can it fix a commit I already made?
Yes. gitswitch reauthor rewrites the author and committer on existing commits. If the commits are already shared, coordinate before rewriting history.
$ Is gitswitch open source?
Yes. It’s written in Go and licensed under Apache-2.0.