Git Identity Fixer
Mar 2026
git-identity-rewriter
Fix the wrong author name and email across every Git repo in a folder at once, with verified backups taken before any history is rewritten. It restores remotes that filter-repo would delete and can optionally force-push the corrected history.
The commits that ratted me out
One laptop. Work stuff, personal projects, the odd open-source thing, all on the same machine. Git doesn't know or care which hat you've got on, it just stamps whatever email is in your global config onto every commit. You can probably guess where this is going.
One day I scrolled back through my history and there it was: my personal Gmail all over a private work repo, and my work email signing commits on a weekend project that had nothing to do with the company. Nothing broke exactly, but it bugged me. Kind of like finding your name written in the wrong notebook over and over.
Fixing it by hand is genuinely awful. For every single repo you have to rewrite the history, write a little mapping file, deal with the fact that the rewrite tool deletes your remotes while it's at it, and then force-push the whole thing. Per repo. Hard pass.
So I automated the annoying part
You point git-identity-rewriter at a folder, it finds every repo with commits under the wrong identity, and it hands you a checklist. You tick the ones you want fixed and it does the rest: rewrites the history, puts the remotes back, and will force-push the corrected version for you if you want it to.
Anything it can't safely touch (shallow clones, a repo stuck mid-merge, a bare repo) shows up greyed out with a reason, so you're never sitting there wondering why one got skipped.
Safety, because this thing is a chainsaw
Rewriting git history can absolutely wreck things, so the tool treats it that way. Before it touches a single commit, it zips up a backup of every repo it's about to change, and checks that each backup actually worked. No backup, no rewrite, end of story. Hit Ctrl+C whenever and it bails out cleanly with your backups still sitting there. There's a dry-run mode too, for when you want to watch it think without letting it do anything. And it logs everything it did.
If it somehow still goes wrong, rolling back is just "delete the folder, unzip the backup, put it back." That's the kind of safety net I like to have.
One friendly warning
If you do let it force-push, just remember you're rewriting history other people might've already pulled. Give your teammates a heads-up first. Don't be the person who quietly force-pushes on a Friday and then logs off for the weekend.