Stop Juggling SSH Keys: How to Manage Multiple Git Profiles

If you are a developer, chances are you’ve run into this nightmare: You just spent an hour writing an amazing feature for a client or your company. You run git commit and push it to GitHub, only to realize that you accidentally committed it using your personal user.email and it’s now permanently attached to your personal account.

Worse, you constantly get "Permission denied (publickey)" errors because your ~/.ssh/config is a mess of manual Host blocks, and your SSH agent is confused about which key to use.

For years, the standard advice for managing multiple GitHub accounts on one computer has been to manually edit your ~/.ssh/config file and use the rigid includeIf directive in your .gitconfig.

But it's 2026. Managing your Git identity shouldn't require manual file editing every time you take on a new freelance client.