In my ~/.gitconfig
, I list my personal email address under [user]
, since that\'s what I want to use for Github repos.
But, I\'ve recently s
Since git 2.13, it is possible to solve this using newly introduced Conditional includes.
An example:
Global config ~/.gitconfig
[user]
name = John Doe
email = john@doe.tld
[includeIf "gitdir:~/work/"]
path = ~/work/.gitconfig
Work specific config ~/work/.gitconfig
[user]
email = john.doe@company.tld