i've been using direnv to manage more and more things.
i use a few distinct identities to publish software. git supports global and repo-local config, but for each id i have a few repos to keep in sync.
this morning i set up direnv to switch git config for me. as a bonus it keeps things organized.