Installation
Install gitswitch on macOS or Linux
gitswitch is a single Go binary. macOS and Linux, Intel and Apple Silicon/ARM.
Homebrew
brew install aksisonline/tap/gitswitchRecommended — it handles PATH, updates, and uninstall cleanly.
brew upgrade gitswitch # latercurl
curl -fsSL https://get.gitswitch.dev | bashDownloads the right binary for your OS and architecture into /usr/local/bin. Upgrade later with gitswitch upgrade.
Go
go install github.com/aksisonline/gitswitch@latestRequires Go 1.21+.
From source
git clone https://github.com/aksisonline/gitswitch
cd gitswitch
make installCheck it worked
gitswitch versiongitswitch v0.3.0
Already on latest version.What you need installed
git | Required. gitswitch installs it for you on first run if it's missing. |
gh (GitHub CLI) | Optional, but recommended — HTTPS push routing and Session Isolation need it. Same first-run offer. |
Check both at any time:
gitswitch doctorRun it
gitswitchThat's it — one command handles both cases:
- Nothing installed — installs
git/ghitself, then you log in with GitHub once. - Already set up — imports your git config,
ghaccounts, and SSH keys, matching aghaccount to your git config by verified email so you don't get duplicates.
Want shell integration too (prompt segment, nudges, HTTPS push routing, Session Isolation)? That's a separate, optional step:
gitswitch shellEverything is opt-out, defaults are sensible, and it's safe to re-run. See Shell Integration.
Then head to the Quick Start.
Staying up to date
gitswitch version # what am I on? is there anything newer?
gitswitch upgrade # get itgitswitch also tells you inside the TUI when a new release lands, and shows a "What's New" screen after a feature release. Want the pre-release builds? See Release Channels.
Uninstall
gitswitch uninstall # remove shell integration, HTTPS routing, gh wrapper
brew uninstall gitswitch # then remove the binary
rm -rf ~/.config/gitswitch # and your profiles, if you're sure