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.

view all options →
$brew install aksisonline/tap/gitswitch

macOS, Linux, Windows · New to Git? Get set up from scratch →

gitswitch: identity manager
✦ Gitswitch
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
hover or tab to interact · try 1-3 ↑↓ ↵

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.

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-account
personal · ~/personal/site
$ gitswitch pin personal
$ git config user.email
you@personal.dev

$ gh api user --jq .login
personal-account

A router, not a credential vault. Keys stay in ~/.ssh/, tokens in your OS keychain. Read how it works →

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.

Log in. Pin a repo. Keep working.

  1. Log in once. gitswitch login hands off togh auth login and creates your profile—no token to copy into another tool.
  2. Add your identities. Set the name and email for each profile; attach SSH or signing keys if you use them.
  3. Pin a repo. Run gitswitch pin work in a repo. Then keep using git and gh as usual.

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.

Get gitswitch.

homebrewmacOS · Linux · recommended
$brew install aksisonline/tap/gitswitch
curlmacOS · Linux · WSL
$curl -fsSL https://get.gitswitch.dev | bash
go installany platform · requires go 1.22+
$go install github.com/aksisonline/gitswitch@latest
windowsPowerShell
$irm https://get.gitswitch.dev/install.ps1 | iex

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.