v0.4.3 · written in go

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.

view all options →
$brew install aksisonline/tap/gitswitch
gitswitch: identity manager
✦ Git-Switcher
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 ↑↓

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.

[01]
identity
Switch user.name and user.email globally, instantly, or pin a repo once and it never needs switching again — even across every terminal you open.
[02]
parallel accounts
Any number of terminals, any number of GitHub accounts, no fighting. Every gh command resolves the right account for its repo on its own — including the ones an AI agent opens for you.
[03]
ai setup
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.
[04]
setup
gitswitch login: GitHub device flow creates your profile automatically — name, email, GitHub account, token, and an SSH key if you want one.
[05]
ssh keys
Sets core.sshCommand to force a specific key with IdentitiesOnly=yes, preventing agent fallback — the same key doubles as your signing key.
[06]
commit signing
Per-profile GPG or SSH signing key. Switch and your verified-commit badge follows the right identity automatically.

vs gh auth switch

Two tools, two different problems. gitswitch handles what the GitHub CLI intentionally ignores.

capabilitygh auth switchgitswitch
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.

[if]
already using includeIf?
Git's 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]
already using SSH host aliases?
Hand-maintaining ~/.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.
[cli]
already using another switcher?
Most git account-switcher CLIs stop at commit identity or 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.
[gui]
prefer a GUI or IDE extension?
Editor-specific switchers only work inside that one editor. gitswitch is terminal-native: the same behavior in your shell, an editor's integrated terminal, or an AI coding agent's sandbox.

up in 30 seconds.

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

what's next

gitswitch is Go all the way. Here's what's shipping.

shipped · stable

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.

full changelog ↗

coming up

Multi-host profiles: one profile, multiple GitHub hosts (github.com + github.corp.com), each with its own key and token.

on the horizon

Team presets: gitswitch apply <url> bootstraps all profiles from a shared signed config.

In-repo config: .gitswitch.yaml declares required profiles and identity policies.

questions, answered.

$ Do I need multiple GitHub accounts to use gitswitch?
No. gitswitch setup checks for git and the GitHub CLI, offers to install whichever's missing, and gitswitch login configures your identity, SSH key, and signing. That's useful from your very first commit, not just once you have a second account to juggle.
$ Is gitswitch beginner-friendly?
Yes, it's the fastest way to set up git for the first time. No SSH keys to generate by hand, nothing to paste into a settings page.
$ Does gitswitch install git and the GitHub CLI for me?
It checks whether they're installed and, if not, shows you the exact command and asks to run it for you (brew/apt/dnf/winget depending on your platform). On macOS, git itself comes from Apple's Xcode Command Line Tools, a GUI dialog gitswitch can't drive for you, so it shows the command instead of running it; the GitHub CLI still installs automatically there.
$ How do I prevent accidental commits with the wrong GitHub email?
Pin the repo once with gitswitch pin work (or personal) — it writes the correct identity into that repo's local git config, so every future commit there uses the right name and email even if your global identity is set to something else. Already committed under the wrong one? gitswitch reauthor rewrites author/committer on commits that already exist.
$ How do I use gh CLI with multiple accounts in different terminals at once?
Turn on Session Isolation (default on new installs): each terminal's bare gh commands resolve to whichever account owns the repo you're standing in, so any number of terminals can run as different GitHub accounts simultaneously without one flipping the other's global auth state.
$ How do I use separate SSH or GPG signing keys per GitHub account without hand-editing includeIf blocks?
gitswitch add attaches an SSH key and/or signing key to a profile, then switching profiles sets core.sshCommand with IdentitiesOnly=yes so the right key gets offered, no SSH agent fallback and no per-directory includeIf config to maintain.