Organizing multiple Git identities
Git
https://garrit.xyz/posts/2023-10-13-organizing-multiple-git-identities
global config file, ~/.gitconfig
[user]
name = Garrit Franke
email = garrit@slashdev.space
[includeIf "gitdir:~/work/"]
path = ~/.gitconfig-work
[includeIf "gitdir:~/work/client2/"]
path = ~/.gitconfig-client2
[includeIf "gitdir:~/sources/"]
path = ~/.gitconfig-personal
If the repository is located inside the ~work directory, a file named ~.gitconfig-work is included. This is just another gitconfig file. This is what that looks like in my case:
[user]
name = Garrit Franke
signingkey = 12345678
email = garrit@work.de
[commit]
gpgsign = true