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

Can `git config` override entries in .gitconfig?

From
NLNicholas LaRoche <nlaroche@vt.edu>
Date
Dec 23, 2008, 12:05 UTC
Message-ID
<4950D41A.5050009@vt.edu>

Is there a direct way to change the user.email entry for a git repository for one user (applied to all previous commits)?

I tried `git config --unset user.email` followed by `git config user.email email2` but it just sets a second field called user.email that shows up in `git config -l` as a duplicate. My ~/.gitconfig file contains email1 for the user.email entry.

Also, when the repository is created can I specify a second set of contact information (i.e. using a project specific email) which isn't a part of ~/.gitconfig?

output of `git config -l`: user.email=email1 .. .. user.email=email2

Regards, Nick

Next: Johan Herland
Message 1 of 2 in “Can `git config` override entries in .gitconfig?”
  1. Nicholas LaRocheDec 23, 2008
  2. Johan HerlandDec 23, 2008

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.