On Wed, May 24, 2017 at 8:03 AM Andreas Schwab <schwab@suse.de> wrote:
On Mai 24 2017, Stephen Berman <stephen.berman@gmx.net> wrote:

> Does anyone know why git (or VC) used my login name and the host name of
> my machine instead of my email address in this commit, and how I can
> prevent this from happening again?

git config --global user.email ...

On a related note, the recent git release 2.13.0 has an interesting new feature.. you can specify your git credentials differently for different repos from a central place.

Here is a snippet from my ~/.gitconfig using that feature:

=====
# Below user credentials would be the default.. unless the includeIf overrides are in effect
[user]
name = Kaushal Modi
email = kaushal.modi@gmail.com
# https://github.com/blog/2360-git-2-13-has-been-released
[includeIf "gitdir:~/stow/dot_files/"]
        path = .gitconfig-work
[includeIf "gitdir:~/stow/dot_files_public/"]
        path = .gitconfig-public
=====

This is my ~/.gitconfig-work:
=====
# -*- mode: conf-unix -*-
[user]
name = Kaushal Modi
email = <my work email>
=====

and my ~/.gitconfig-public:
=====
# -*- mode: conf-unix -*-
[user]
name = Kaushal Modi
email = kaushal.modi@gmail.com
=====

 
--

Kaushal Modi