At 11:59 +0200 10 Aug 2013, Michael Haggerty <> wrote:
I intentionally don't set in my ~/.gitconfig because I use
different identities (on the same machine) depending on what project I
am committing to (open-source vs. work).  After I clone a repo, I *rely*
on Git reminding me to set on my first commit, because I
invariably forget to set it myself.  And for me, *any* universal,
heuristically-determined email address would be wrong for me for at
least some repos.

I was in a similar situation for awhile. Except in my case I had $EMAIL set for other reasons, so I didn't get the reminder even if git wasn't configured.

The solution I came up with was to use a template directory to have the following script installed as a pre-commit hook in all new repos:

 git config > /dev/null && exit
 echo 'Set email address with `git config` first' >&2
 exit 1
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to
More majordomo info at

Reply via email to