Re: feature request: allow commit.email config setting
- From
Eric Sunshine <sunshine@sunshineco.com>
- Date
- Aug 30, 2018, 18:13 UTC
- Message-ID
- <CAPig+cTnvDfYaDh7JSXXGGA=+DE4WAiuTZEKpxv67u1_OyT-qA@mail.gmail.com>
- In-Reply-To
- <0f66ad7a-2289-2cce-6533-a27e19945187@rasmusvillemoes.dk>
On Thu, Aug 30, 2018 at 7:26 AM Rasmus Villemoes <rv@rasmusvillemoes.dk> wrote:
Show 6 quoted lines
> I can set GIT_COMMITTER_EMAIL in the environment, but that is > rather inconvenient, since that means I have to remember to do that in > the shell I'm using for that particular project, and I can't use that > shell for other projects. So it would be really nice if I could set > commit.email = $private-email in the local .git/config for that > particular project.
Aside from modifying Git itself to support such a use-case, another (perhaps more pragmatic) approach would be to use a tool, such as direnv[1], which automatically sets environment variables for you depending upon your current working directory, or just use some ad-hoc shell programming to achieve the same (for instance, [2]).
[1]: https://direnv.net [2]: https://stackoverflow.com/questions/14462591/set-environmental-variables-in-a-particular-directory