There are some nuances. Took me a bit to piece it all together.
- Just add an if condition at the end of your existing global
.gitconfigat your root directory.
[includeIf "gitdir:~/something/personal/"]
path = .gitconfig-personal
[includeIf "gitdir:~/elsewhere/work/"]
path = .gitconfig-work