From: Reto Date: Tue, 11 Oct 2022 05:51:30 GMT Subject: Re: Multiple --global config workspaces? Message-ID: <20221011055130.gvoh44rbulg3f4jn@feather> In-Reply-To: On Mon, Oct 10, 2022 at 11:06:32PM -0400, Elsie Hupp wrote: > What might possibly help in this situation could be if I could have the global ~/.gitconfig somehow delegate to separate .gitconfig files in each of the workspace folders I have set up, e.g.: > ~/Repositories/github/.gitconfig > ~/Repositories/gitlab/.gitconfig That already exists, git-config(1), look for "Conditional includes" That way you can do it per top level folder or whatever makes sense for you. Examples: ; include for all repositories inside /path/to/group [includeIf "gitdir:/path/to/group/"] path = /path/to/foo.inc ; include for all repositories inside $HOME/to/group [includeIf "gitdir:~/to/group/"] path = /path/to/foo.inc