On 23 February 2017 at 00:12, Tushar Kapila <tgkp...@gmail.com> wrote:
> I can set my email via:
> git config --global user.email tgkp...@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
> tgkp...@search.com for github and tus...@mycompany.com for my company
> private repo).

There has been a large discussion around this idea before, see this
thread for example [0].

The proposed idea was to have something set in your global config that
would only be turned on if you were within a given directory. This
would allow you to have two root directories, one for your work
projects and one for open source projects (for example) and any git
repositories within those folders would each would have their own
config options automatically applied based on their location.

There was a patch suggested, and it worked quite well, but nothing
further has been done to my knowledge.

[0] http://public-inbox.org/git/7vvc3d1o01....@alter.siamese.dyndns.org/

Regards,

Andrew Ardill

Reply via email to