Setting up Git identities
You can also do a per-directory _global_ git configuration, e.g.<p>in .gitconfig, you say:<p><pre><code>    [user]
        name = Me Myself
        email = personal@example.com
        signingkey = D34DB44F

    [includeIf "gitdir:~/src/github.com/work_org/"]
        path = ~/.gitconfig_work
</code></pre>
Then in ~/.gitconfig_work:<p><pre><code>    [user]
        name = Me Myself
        email = work@example.com
        signingkey = D34DC0D4
    
    [core]
        sshCommand = ssh -i ~/.ssh/work_ed25519
</code></pre>
I like this way better, because I don't need to remember to specify per-project config, as long I put them in the right directory :-)