How to provide custom Git configuration for different projects
Git provides an option to load different configurations based on path of repositories. It uses includeIf
sections in ~/.gitconfig
file, which allow you to include config directives from another source.
Let's assume your projects are grouped by "parent" directories, like directory called company-a contains all projects related to company-a, etc. Therefore, all settings inside that path will be additionally applied from .gitconfig-company-a
.