Is there a way to configure git log to use a mailmap file by default? Without having to specify a format (or an alias for one).
mailmap exists at the toplevel of the repository, or at the location pointed to by the mailmap. file or mailmap. blob configuration options (see git-config[1]), it is used to map author and committer names and email addresses to canonical real names and email addresses.
To show all of the branches, add --all to your git log command. So basically, without --all you only see the commits that actually make up your current branch.
The git shortlog command is a special version of git log intended for creating release announcements. It groups each commit by author and displays the first line of each commit message. This is an easy way to see who's been working on what.
If the file .mailmap exists at the toplevel of the repository, or at the location pointed to by the mailmap.file or mailmap.blob configuration options (see git-config [1] ), it is used to map author and committer names and email addresses to canonical real names and email addresses.
The email (or name and email) in the “find” part of the entry will be used in a case-insensitive way to identify a git author and replace it with whatever is included in the “replace” part which allows mailmap to replace only the email part of a commit, and:
As you read briefly in Getting Started, you can specify Git configuration settings with the git config command. One of the first things you did was set up your name and email address: $ git config --global user.name "John Doe" $ git config --global user.email [email protected]
Git’s configuration files are plain-text, so you can also set these values by manually editing the file and inserting the correct syntax. It’s generally easier to run the git config command, though.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With