per company git config - 06-03-22
Started new job this week and I wanted to have a seprate email on my work related repos then my personal ones. Cool thing is git supports conditional config file includes!
# per-user git config [user] name = Travis Shears email = firstname.lastname@example.org [includeIf "gitdir:~/company-x/"] path = .gitconfig-company-x
# Company X spefic git config [user] name = Travis Shears email = email@example.com
Now any commits made under the directory ~/company-x will use the email firstname.lastname@example.org and not my personal email.