Git Got Me Yelled At, So I Built GiMan
If you use the same computer for work and personal projects, you've probably experienced this.
You're in the middle of a coding session, run:
git push
A few seconds later, you realize the commit went up under the wrong GitHub account.
Maybe your personal account just committed to a company project. Maybe the CI/CD pipeline failed. And suddenly you're trying to figure out which Git configuration, SSH key, or account caused the mess.
I've been there.
My workflow became a checklist:
- Check
git config - Check the commit email
- Check which GitHub account I'm using
- Check the SSH key
- Make sure everything is configured correctly for the project
It worked — until it didn't.
Eventually, in true developer fashion, I started digging into the problem and built a tool to fix it.
Git Already Has the Pieces
The funny thing is that Git already provides most of what you need to solve this problem.
There are two important mechanisms.
Git includeIf
Git's includeIf allows you to automatically load different Git configurations depending on which directory you're working in.
For example:
~/work
~/personal
~/clients
You can configure Git so that repositories under each directory automatically use a different identity.
SSH Host Aliases
SSH also lets you define different host aliases that use different SSH keys.
For example, you could have separate identities for:
github-work
github-personal
github-client
Individually, both mechanisms work great.
The problem is that Git doesn't know anything about SSH, and SSH doesn't know anything about Git.
If one configuration changes and the other doesn't, things can break.
You might commit using the correct Git identity but push using the wrong SSH key.
Or you might have the correct SSH key configured but accidentally create commits using the wrong email address.
Managing both manually gets tedious quickly, especially when you're freelancing, working with multiple clients, or contributing to open source alongside your day job.
I wanted one place to manage all of it.
Building GiMan
That's how GiMan — Git Identity Manager was born.
The idea is simple:
Define your identities once, map them to directories, and let GiMan handle the rest.
For example:
~/work → Work account
~/personal → Personal account
~/clients/acme → Client account
From that configuration, GiMan generates the pieces Git and SSH need:
- Git
includeIfrules - Per-identity Git configurations
- SSH host aliases
Once everything is configured, switching between projects automatically switches your Git identity.
No aliases to remember.
No sticky notes.
No wondering which SSH key belongs to which repository.
The gid clone Command
One feature I didn't originally plan became one of my favorites: gid clone.
Normally, when cloning a repository, you need to remember which SSH host alias belongs to which account.
Instead, GiMan lets you use the normal GitHub URL and choose the identity you want.
For example:
gid clone git@github.com:company/project.git
GiMan can take care of rewriting the repository URL to use the appropriate SSH configuration before cloning it.
It's a tiny feature, but it's exactly the kind of thing I wanted from the tool.
It removes one more piece of mental overhead from my workflow.
Why I Built It
GiMan wasn't originally meant to be a product.
It started as a weekend project to solve an annoyance I'd been dealing with myself.
But after using it every day, I realized that other developers were probably dealing with the same problem.
Maybe you're juggling:
- A work GitHub account
- A personal GitHub account
- Multiple freelance clients
- Open-source contributions
- Different SSH keys
- Different commit identities
Your Git identity should just work.
You shouldn't have to think about it every time you open a terminal.
That's what GiMan is designed to do.
Try GiMan
If you're dealing with multiple Git identities, you can check out GiMan and see if it fits your workflow.
The project is also open source, so contributions, feedback, and ideas are welcome.
Sometimes the best developer tools start with something as simple as:
"I'm tired of dealing with this."