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

Re: feature request: user email config per domain

From
Pranit Bauva <pranit.bauva@gmail.com>
Date
Feb 22, 2017, 13:51 UTC
Message-ID
<CAFZEwPNEeCyVUbaU2J_9CuqCnvRjMR0DuHjz9cM81DzN0MYN8g@mail.gmail.com>
In-Reply-To
<CAN0Skmmjd5Y0uWz_WC69mAStucZ6nR0mjdp4-ODJz2UnTaB-eQ@mail.gmail.com>
Hey Tushar,

When you run `git config --global user.email abc@xyz.com` it writes out this setting in ~/.gitconfig which is then considered to be "global" ie. this same email will be used for every repo, but ...

You can always override this. Let's say there is a repo named "foo" in which you want the email "xyz@abc.com", then you go inside that folder and type `git config user.email xyz@abc.com`. Note: the option `--global` is skipped here. This creates a file `.gitconfig` in the folder "foo" and now whenever you commit, the .gitconfig file inside the repo will get the first preference and then the global ~/.gitconfig.

This will work for you assuming that you have different repos for your company and for your open source work. Will this solve your problem?

Regards, Pranit Bauva

Previous: Tushar KapilaNext: Andrew Ardill
Message 2 of 6 in “feature request: user email config per domain”
  1. Tushar KapilaFeb 22, 2017
  2. Pranit BauvaFeb 22, 2017
  3. Andrew ArdillFeb 22, 2017
  4. Jeff KingFeb 23, 2017
  5. Igor Djordjevic BugAFeb 23, 2017
  6. Fwd: Re: feature request: user email config per domainIgor Djordjevic, Feb 23, 2017

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.