by SysArchitect · 10y ago · 0 comments
I have a pre-commit hook that is installed on all new repo's I create/clone that warns me, and then I set an email address PER REPO. This way I can work on both $WORK and open source projects on the same machine while having different email addresses per repository.
The assumption that a user needs to have user.email set globally breaks my entire work-flow.
# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
#
# Committer: Ben Alpert <balpert@balpert-mbp.local>
#
# On branch master
# Your branch is up-to-date with 'origin/master'.
#I used to do something similar to you, but this has been less effort to maintain/less repetition :) (which is nice, as our internal structure is lots of micro-repos so you're constantly cloning new things, and constantly adding creds becomes a hassle).