Information Technology Reference
In-Depth Information
from
.gitconfig
are used when you create the revision with a
$ git commit
command. Therefore, if you first define your name as:
[user]
name = johny
email =
john.doe@example.net
and later decide to change it to:
[user]
name = John Doe
email =
john@doe.example.com
then the history of your repository will contain two authors:
johny
and
John Doe
.
The command:
$ git shortlog -s
will return both names because they are treated as different people:
13 johny
8 John Doe
This output informs us that johnny authored 13 revisions and that John Doe au-
thored eight. You can provide additional information that both names johny and John
Doe in fact refer to the same person. This mapping should be stored within the
.mailmap
file in the working directory. Every line of the file defines the mapping of
names to names or emails to emails. The line:
Proper Name <
commit@example.net
>
labeled with the name
Proper Name
.
The line:
<
proper@example.net
> <
commit@example.net
>