Git Separate Work & Personal Config
With Git it is possible to separate your personal config from your work config.
.gitconfig
[includeIf "gitdir:~/dev/personal/"]
path = ~/.gitconfig.personal
[includeIf "gitdir:~/dev/work/"]
path = ~/.gitconfig.work
.gitconfig.personal
[user]
name = Marcel Beck
email = [email protected]
signingKey = 0x983D12649C40C7EC
.gitconfig.work
[user]
name = Marcel Beck
email = <company email>
signingKey = <company signing key>
Or if you want to include different work configs, you could also add another includeIf
in .gitconfig.work
[includeIf "gitdir:~/dev/work/<company>/"]
path = ~/.gitconfig.work.<company>
.gitconfig.work.<company>
[user]
name = Marcel Beck
email = <company email>
signingKey = <company signing key>