I recently learned, that you're able to switch the git user dynamically based on the folder the repository resides in, by using the includeif directive in your gitconfig. [1]
This is very useful, if you have separate accounts, for example a business and a personal account.