On 23 February 2017 at 00:12, Tushar Kapila <[email protected]> wrote:
> I can set my email via:
> git config --global user.email [email protected]
>
> 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
> [email protected] for github and [email protected] 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/[email protected]/

Regards,

Andrew Ardill

Reply via email to