Git - committing as multiple identities (personal and work email)

The problem is pretty straight forward: I have a personal email and a work email and depending on the project I’m working on, I should commit as the identity relevant to that repo. So in a personal project, the git author should be damien@personalemail.com and within a work project, the git author should be damien@workemail.com. Git config has the ability to include other config files based on the directory the repo is in outline in the git-config Includes. Let’s assume our ~/.gitconfig file looks something like this: ...

July 11, 2021 · 1 min · Damien Pontifex