I think you can achieve this with an SSH config like
Host github-personal
HostName github.com
IdentityFile ~/.ssh/id_rsa_personal
Host github-work
HostName github.com
IdentityFile ~/.ssh/id_rsa_work
Then you can use `github-work` or `github-personal` in the remote URL like `git clone git@github-work:mywork/somerepo.git`.edit: I realized after reading the other comments that I got the problem wrong! This would push the commits from the correct GitHub account but the commits would still have the e-mail from git's config and GitHub would link the account in the committer e-mail.