Suppose your Secondary development folder path is:
/Users/swalahamani/DEV/SecondDevHome
Configure your Users/swalahamani/.gitconfig
file like the below:
[core]
editor = nano
[user]
email = <[email protected]>
name = <Your Full Name>
signingkey = <PERSONAL-GPG-KEY-ID>
[commit]
gpgsign = true
[branch]
autosetuprebase = always
[init]
defaultBranch = main
[log]
date = iso-local
[includeIf "gitdir:~/DEV/SecondDevHome/"]
path = ~/.gitconfig-second-dev-home
Configure your Configure your Users/swalahamani/.gitconfig-second-dev-home
file like below:
[core]
editor = nano
[user]
email = <[email protected]>
name = <Your Full Name>
signingkey = <SECOND-DEV-HOME-GPG-SIGN-KEY-ID>
[commit]
gpgsign = true
[branch]
autosetuprebase = always
[init]
defaultBranch = main
[log]
date = iso-local
You can add as many paths and config files as you wish with different different user accounts. Please note that, the other config options except the below mentioned section:
[includeIf "gitdir:~/DEV/SecondDevHome/"]
path = ~/.gitconfig-second-dev-home
put in the main Users/swalahamani/.gitconfig
file can be adjusted according to your needs.