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

feature request: user email config per domain

From
TKTushar Kapila <tgkprog@gmail.com>
Date
Feb 22, 2017, 13:12 UTC
Message-ID
<CAN0Skmmjd5Y0uWz_WC69mAStucZ6nR0mjdp4-ODJz2UnTaB-eQ@mail.gmail.com>

I can set my email via: git config --global user.email tgkprog@xyz.dom

this is dangerous when I use this my office or in a multi repository provider environment where my email is different for a few (like tgkprog@search.com for github and tushar@mycompany.com for my company private repo). I know I can over ride it per repository, but sometimes forget to do that. And even if I unset it, it inadvertantly gets set elsewhere when I make a repo and the site 'helps' me by showing me the commands to init and clone my new repo. I did an analysis on a bunch of company git repositories using jgit (only master branch), and we have 57 emails out of 346 which are not the company email. Also in there are cases when name is the same but some commits are by email 1 and others by email 2, because of this global config. As some of us work on open source and company repos on the same computer.

Feature request : can we have a config for email per repo domain ? Something like:

git config --global domain.user.email tgkprog@test.xyz.com testing.abc.doman:8080

git config --global domain.user.email tgkprog@xyz.com abc.doman:80
git config --global domain.user.email tgkprog@search.com github.com

So when remote URL has github.com push as tgkprog@search.com but for testing.abc.doman:8080 use tgkprog@test.xyz.com ?

For me one name is enough. But can do the same for name if others need it?
Thank you.

Regards Tushar Kapila

Next: Pranit Bauva
Message 1 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.