Using different Git accounts in the same computer

When you use different emails for personal and work projects, it’s easy to mess up your Git repos committing to them with the wrong user. This is how to fix that

Photo by Todd Quackenbush on Unsplash

If it’s already happened

If you’ve committed to a personal project (with only you as a committer) with your work email, here’s how to rewrite history for that repo (from this