Configuring git log to use mailmap by default
As of git 1.8.2, git log
takes a --use-mailmap
parameter to enable this behavior.
It appears that this isn't a feature, yet, due to hysterical raisins.
I have Git 2.4.1. If you set log.mailmap
config to true, that will set it to work with git log
also
git config --global log.mailmap true
You can set up defaults in your .gitconfig
file. The documentation says:
log.mailmap
If true, makes
git-log
,git-show
, andgit-whatchanged
assume--use-mailmap
.
This will look for a .mailmap
only in the root of the working tree.
To set:
git config --global log.mailmap true
Global mailmap
file
mailmap.file
The location of an augmenting mailmap file. The default mailmap, located in the root of the repository, is loaded first, then the mailmap file pointed to by this variable. The location of the mailmap file may be in a repository subdirectory, or somewhere outside of the repository itself. See
git-shortlog
andgit-blame
.
To set:
git config --global mailmap.file ~/.mailmap
Advanced
You can also use a repository blob as a mailmap file, see mailmap.blob
in the documentation linked to above.