When you have multiple accounts or multiple ssh keys for git, and you want separation and not to deal with git config --local user.email "blablabla",
You need to directories on your home for example
~/Workspace/work
~/Workspace/personal
Then Put each git-config somwehere, I choose ~/dotfiles
~/dotfiles/.gitconfig-work
~/dotfiles/.gitconfig-personal
Then your main ~/.gitconfig would just use:
[includeIf "gitdir:~/Workspace/work/"]
path = ~/dotfiles/.gitconfig-work
[includeIf "gitdir:~/Workspace/personal/"]
path = ~/dotfiles/.gitconfig-personal
That tells git to load the proper config file when a directory is accessed, like, when you go to
cd ~/Workspace/work
Git will load the .gitconfig-work automatically...
The config files here are mine, so adapt them to your tase..
Cheers