On Mon, Oct 10, 2022 at 10:50:22PM -0700, Junio C Hamano wrote: > One way to do this would be to have > > [includeIf "gitdir:~/Repositories/github/"] path = $HOME/.githubconfig > [includeIf "gitdir:~/Repositories/gitlab/"] path = $HOME/.gitlabconfig > > in $HOME/.gitconfig and then write in these two extra files that are > conditionally included whatever settings you want to use for any and > all repositories that come from GitHub or GitLab. I was about to write the same response. :) One small correction, though: we don't expand $HOME in include paths. You can use "~", but easier still is that non-absolute includes are relative to the including file. Relative paths in includes are relative to the including file. So you can just write ".githubconfig", etc, and we'll expect them adjacent to $HOME/.gitconfig (or the xdg path if you use that, I guess). -Peff