How to Set Up Work and Personal Git Profiles

Tired of accidentally committing to work repos with your personal email? Here&rsquo;s how to automatically use the right Git profile based on where your repositories live. 1. Generate SSH Keys Create separate keys for each account: # Work key ssh-keygen -t ed25519 -C 'work@company.com' -f ~/.ssh/id_ed25519_work # Personal key ssh-keygen -t ed25519 -C 'personal@gmail.com' -f…