The Day I Pushed to Work With My Personal Git Account — and Built Git Switch
A storytelling case study: the wrong-author commit problem, the workarounds that failed, and how exploring solutions led to Git Switch — a desktop app and VS Code extension for multi-account Git switching.

The Day I Pushed to Work With My Personal Git Account
It started the way these things always do: a normal afternoon, a quick commit, a push. Then Slack lit up. The commit on our work repo had my personal email. Not catastrophic — but embarrassing, and a reminder that I was one careless context-switch away from doing it again.
I wasn’t alone in this. Like a lot of developers, I lived in two (sometimes three) Git worlds:
- a personal account for side projects and open source
- a work account with company email and org access
- occasionally a client identity for contract repos
Git is happy to store user.name and user.email. The painful part is everything around them. Identity lives in config. SSH keys live in the agent. HTTPS tokens live in Keychain or Git Credential Manager. gh keeps its own login. Miss one piece and you get the classic combo: commits under the wrong author, “repository not found,” or a push that silently uses yesterday’s credentials.
That friction is what eventually became Git Switch.
The problem I kept running into
Every time I jumped from a personal repo to a work one, I had a mental checklist:
- Change global (or local)
user.name/user.email - Make sure the right SSH key is loaded — or the right HTTPS token is active
- Hope I didn’t leave the other account’s credentials hanging around
- Remember that
ghmight still be logged in as someone else
I forgot steps. Often. Scripts helped for a week, then bit-rotted. Sticky notes on the monitor felt ridiculous. And every “fix it in the terminal” solution assumed I’d remember the exact sequence when I was already mid-flow.
The real problem wasn’t that Git lacked features. It was that switching accounts was a ritual, not a product. I needed something I could trust in two clicks — without pasting secrets into random files.
Exploring solutions (and why they weren’t enough)
Before writing a line of Git Switch, I tried the usual paths.
Manual git config every time. Correct, but slow and easy to skip when you’re rushing a fix.
Per-repo local config. Better isolation, but you still have to set it up once per clone — and it doesn’t help when auth (SSH/PAT) is still global in practice.
SSH Host aliases in ~/.ssh/config. Powerful for power users. Terrible onboarding. Also doesn’t fix HTTPS remotes or the “wrong author on commit” problem by itself.
Shell aliases and little scripts. Fine until you change machines, forget which script is canonical, or need a teammate to use the same flow.
Existing “account switcher” tools. Some only flipped the commit author. Others touched credentials in ways I didn’t want to audit. Most blurred a distinction I cared about: identity (who authors the commit) vs authentication (who is allowed to push).
I started writing down what “good” would look like:
- Save multiple accounts with a human label, name, and email
- Switch globally or for one repository
- Optionally activate the matching SSH key or HTTPS PAT
- Never store tokens in the app’s own config file
- Feel safe enough that I’d actually use it every day
That list became the brief. Building something myself stopped feeling optional.
That exploration led to Git Switch
So I built Git Switch — first as a small local desktop app, then as something people could install where they already work.
The idea was simple: one place to pick an account, one action to switch, and credentials that stay in the OS helpers developers already trust.
What it does today
Multi-account profiles. Save Work, Personal, Client — each with label, user.name, and user.email. Search the list, select, switch.
Global or repo scope. Flip your whole machine, or keep the change inside one repository when you need isolation.
Auth modes that match real life
| Mode | What switch changes | What it does not change |
|---|---|---|
| Identity only | Commit author (user.name / user.email) |
Push/pull authentication |
| SSH key | Commit author + loads the SSH key via ssh-add |
— |
| HTTPS / PAT | Commit author + activates that HTTPS username/PAT | — |
That table exists because of the exploration phase. I had been burned by tools that claimed to “switch accounts” while only changing the author — then left me debugging auth for twenty minutes.
Add with GitHub. Browser approve via GitHub device login. No OAuth App setup, no Client ID homework, no mandatory gh CLI. Sign in once per account; after that, switching updates commit author and HTTPS credentials without opening the browser again.
Local-only by design. Account metadata lives in ~/.gitswitch/. Tokens never go into that JSON file — they go through Keychain, Git Credential Manager, or libsecret.
One honest boundary I kept from day one: Git Switch does not switch GitHub CLI (gh) login. If you use gh, you still run gh auth switch. Pretending otherwise would have been the kind of false confidence that caused my original problem.
How I chose to build it
I wanted something I could ship as a real desktop binary and run from source without a dependency maze:
- Python + Tkinter for a cross-platform UI with almost no install friction
- Shell out to real
git/sshcommands instead of reinventing Git’s config model - PyInstaller for macOS, Windows, and Linux releases
- Tests and CI on every push so “works on my machine” didn’t become the product
Later, the same pain showed up inside the editor. That’s how Git Switch also landed as a VS Code Marketplace and Open VSX extension — switch from the place you’re already coding, not only from a separate window.
What changed after I started using it
The ritual collapsed into a deliberate action: pick an account, switch, keep moving.
- Fewer wrong-author commits on shared repos
- A clear mental model: identity vs SSH vs HTTPS
- No plaintext PAT files sitting in project folders
- The same story on desktop and in VS Code
It didn’t make Git simpler. It made context switching honest.
Try it
- GitHub: github.com/AJ224/Git_Switch
- VS Code Marketplace: gitswitch.git-switch-accounts
- Open VSX: gitswitch/git-switch
- Product Hunt: Git Switch
- Desktop releases: GitHub Releases
If you juggle personal and work Git accounts, this is the tool I wish I’d built the first time I pushed with the wrong identity.
More projects: abhinandanjain.com/projects | Contact