you can have per repo and per directory git config via git conditional includes
[includeIf "hasconfig:remote.*.url:https://*.github.com/**"] path = /home/xani/src/gh/.gitconfig
Quite nice. I had to split into two statements to make it work for both https and ssh because of a bug in git:
[includeIf "hasconfig:remote.*.url:[email protected]:*/**"] path = ~/.gitconfig.work [includeIf "hasconfig:remote.*.url:https://git.work/**"] path = ~/.gitconfig.work
Quite nice. I had to split into two statements to make it work for both https and ssh because of a bug in git: