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, and gitswitch respects it: every later update goes through brew, never around it.
brew upgrade gitswitch # laterWant pre-release builds? The beta channel is a second formula in the same tap — see Release Channels.
curl
curl -fsSL https://get.gitswitch.dev | bashDownloads the right binary for your OS and architecture into /usr/local/bin. Upgrade later with gitswitch upgrade.
Pick one install method and stay with it. If Homebrew already manages gitswitch, the script stops and tells you to use brew upgrade instead of installing a second copy that would shadow the first.
Go
go install github.com/aksisonline/gitswitch/cmd/gitswitch@latestRequires Go 1.21+.
From source
git clone https://github.com/aksisonline/gitswitch
cd gitswitch
make installCheck it worked
gitswitch --versiongitswitch v0.5.0gitswitch --help lists every command; gitswitch <command> --help shows that command's flags and examples.
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 it — through Homebrew if that's how you installedgitswitch also tells you inside the TUI when a new release lands (press u), 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