Re: Multiple --global config workspaces?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux