git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Pranit Bauva <pranit.bauva@gmail.com>
To: Tushar Kapila <tgkprog@gmail.com>
Cc: Git List <git@vger.kernel.org>
Subject: Re: feature request: user email config per domain
Date: Wed, 22 Feb 2017 19:21:35 +0530	[thread overview]
Message-ID: <CAFZEwPNEeCyVUbaU2J_9CuqCnvRjMR0DuHjz9cM81DzN0MYN8g@mail.gmail.com> (raw)
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

  reply	other threads:[~2017-02-22 13:51 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-22 13:12 feature request: user email config per domain Tushar Kapila
2017-02-22 13:51 ` Pranit Bauva [this message]
2017-02-22 23:21 ` Andrew Ardill
2017-02-23  0:42 ` Jeff King
2017-02-23  1:30 ` Igor Djordjevic BugA
2017-02-23 19:29   ` Fwd: " Igor Djordjevic

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAFZEwPNEeCyVUbaU2J_9CuqCnvRjMR0DuHjz9cM81DzN0MYN8g@mail.gmail.com \
    --to=pranit.bauva@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=tgkprog@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).