Having my personal developer accounts separate from work accounts is something that I’ve always advised, but it sometimes hasn’t been easy to ensure I’m using the proper key. Up until a few weeks ago I was running BASH scripts I wrote that did the swap for me, but that was starting to feel like I was doing this the wrong way. It worked, but it felt like the bad kind of work-around.
After a little poking around (Binging it) I came across the information I needed to do this properly. Someone also made a handy GIST on Github that walks through the process of configuring GIT to handle the association of different keys to repositories.
I may also look more into this and consider using a more advanced configuration as suggested in this StackOverflow response but for now this does the trick and I’m able to keep multiple identities in order.