Re: Multiple user.name and user.email (possible feature request)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Apr 18, 2010, at 2:12 AM, Eli Barzilay wrote:

Is there a way to have *no* default or some invalid default for the
name/email -- something that will make git refuse to create a commit?

For example, I'd be happy if I could put this in my global config:

 [user]
   name = "Eli Barzilay"
   email = "-"

and then have git barf at me when I try to commit with these settings,
since I prefer being forced to set the appropriate address for each
repository rather than deal with the alternative confusion (or just
accepting the limitations and always using the same name/email).


Eli,

Just set the variable in the repository, not the global config.

i.e. drop the --global flag. So, in your repository:
git config user.email "that-repos-config"

I have three different email address for different repositories on my computer. I have my global config set with my most common address, and the repositories with the less common email set locally in the repository.

Steve


--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]