Setup your Git repositories to always use a specific identity based on the directory tree.
With karn, you never have to manually change the local repository configuration to a different identity from your global.
karn will change your repository’s local user.name and user.email configuration if necessary, but will never modify your global configuration.