[includeIf "gitdir:~/work/client1/"] path = ~/work/client1/.gitconfig [includeIf "gitdir:~/work/client2/"] path = ~/work/client2/.gitconfig
[includeIf "hasconfig:remote.*.url:https://client1domain.com/**"] path = ~/work/client1/.gitconfig [includeIf "hasconfig:remote.*.url:https://client2domain.com/**"] path = ~/work/client2/.gitconfig
[1] https://git-scm.com/docs/git-config#Documentation/git-config...
[2] https://news.ycombinator.com/item?id=36800853
I create a top level directory for collection of related repositories. It lets me configure git for different collection of repositories.