git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Eli Barzilay <eli@barzilay.org>
Date
Apr 18, 2010, 09:12 UTC
Message-ID
<19402.52486.274010.66636@winooski.ccs.neu.edu>

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).

[When I tried to see if it's possible I was surprised to see that git happily creates commits for "- <->" and even " <>".]

-- 
          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                    http://barzilay.org/                   Maze is Life!
Next: Steven Michalske
Message 1 of 7 in “Multiple user.name and user.email (possible feature request)”
  1. Eli BarzilayApr 18, 2010
  2. Steven MichalskeApr 18, 2010
  3. Jeff KingApr 18, 2010
  4. Sverre RabbelierApr 18, 2010
  5. Jeff KingApr 18, 2010
  6. Eli BarzilayApr 18, 2010
  7. Eli BarzilayApr 18, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.