If you have multiple GitHub accounts (e.g., personal and work accounts) and need to switch between them on macOS, follow these steps to configure SSH and Git properly.
-
Open a terminal and generate an SSH key for each account:
ssh-keygen -t rsa -b 4096 -C "your_personal_email@example.com"