<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">

<article lang="en" id="git-shortlog(1)">
<articleinfo>
    <title>git-shortlog(1)</title>
        <indexterm>
                <primary>git-shortlog(1)</primary>
        </indexterm>
</articleinfo>
<simplesect id="_name">
<title>NAME</title>
<simpara>git-shortlog - Summarize <emphasis>git-log</emphasis> output</simpara>
</simplesect>
<simplesect id="_synopsis">
<title>SYNOPSIS</title>
<blockquote>
<literallayout>git log --pretty=short | <emphasis>git shortlog</emphasis> [-h] [-n] [-s] [-e] [-w]
git shortlog [-n|--numbered] [-s|--summary] [-e|--email] [-w[&lt;width&gt;[,&lt;indent1&gt;[,&lt;indent2&gt;]]]] [&lt;committish&gt;&#8230;]</literallayout>
</blockquote>
</simplesect>
<simplesect id="_description">
<title>DESCRIPTION</title>
<simpara>Summarizes <emphasis>git-log</emphasis> output in a format suitable for inclusion
in release announcements. Each commit will be grouped by author and
the first line of the commit message will be shown.</simpara>
<simpara>Additionally, "[PATCH]" will be stripped from the commit description.</simpara>
</simplesect>
<simplesect id="_options">
<title>OPTIONS</title>
<variablelist>
<varlistentry>
<term>
-h
</term>
<term>
--help
</term>
<listitem>
<simpara>
        Print a short usage message and exit.
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
-n
</term>
<term>
--numbered
</term>
<listitem>
<simpara>
        Sort output according to the number of commits per author instead
        of author alphabetic order.
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
-s
</term>
<term>
--summary
</term>
<listitem>
<simpara>
        Suppress commit description and provide a commit count summary only.
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
-e
</term>
<term>
--email
</term>
<listitem>
<simpara>
        Show the email address of each author.
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
-w[&lt;width&gt;[,&lt;indent1&gt;[,&lt;indent2&gt;]]]
</term>
<listitem>
<simpara>
        Linewrap the output by wrapping each line at <literal>width</literal>.  The first
        line of each entry is indented by <literal>indent1</literal> spaces, and the second
        and subsequent lines are indented by <literal>indent2</literal> spaces. <literal>width</literal>,
        <literal>indent1</literal>, and <literal>indent2</literal> default to 76, 6 and 9 respectively.
</simpara>
</listitem>
</varlistentry>
</variablelist>
</simplesect>
<simplesect id="_files">
<title>FILES</title>
<simpara>If a file <literal>.mailmap</literal> exists at the toplevel of the repository, or at the
location pointed to by the log.mailmap configuration option,
it is used to map author and committer names and email addresses to
canonical real names and email addresses.
This can be used to coalesce together commits by the same person where
their name and/or email address was spelled differently.</simpara>
<simpara>In the simple form, each line in the file consists of the canonical real name
of an author, whitespace, and an email address used in the commit
(enclosed by <emphasis>&lt;</emphasis> and <emphasis>&gt;</emphasis>) to map to the name. Thus, looks like this</simpara>
<literallayout class="monospaced">Proper Name &lt;commit@email.xx&gt;</literallayout>
<simpara>The more complex forms are</simpara>
<literallayout class="monospaced">&lt;proper@email.xx&gt; &lt;commit@email.xx&gt;</literallayout>
<simpara>which allows mailmap to replace only the email part of a commit.</simpara>
<literallayout class="monospaced">Proper Name &lt;proper@email.xx&gt; &lt;commit@email.xx&gt;</literallayout>
<simpara>which allows mailmap to replace both the name and the email of a commit
matching the specified commit email address. And</simpara>
<literallayout class="monospaced">Proper Name &lt;proper@email.xx&gt; Commit Name &lt;commit@email.xx&gt;</literallayout>
<simpara>which allows mailmap to replace both the name and the email of a commit
matching the specified commit name and email address.</simpara>
<simpara>So, for example, if your history contains commits by two authors, Jane
and Joe, whose names appear in the repository under several forms:</simpara>
<literallayout>Joe Developer &lt;joe@example.com&gt;
Joe R. Developer &lt;joe@example.com&gt;
Jane Doe &lt;jane@example.com&gt;
Jane Doe &lt;jane@laptop.(none)&gt;
Jane D. &lt;jane@desktop.(none)&gt;</literallayout>
<simpara>Then, supposing Joe wants his middle name initial used, and Jane prefers
her family name fully spelled out, a proper <literal>.mailmap</literal> file would look like:</simpara>
<literallayout># Note how we don't need an entry for &lt;jane@laptop.(none)&gt;, because the
# real name of that author is correct already, and coalesced directly.
Jane Doe &lt;jane@desktop.(none)&gt;
Joe R. Developer &lt;joe@example.com&gt;</literallayout>
<simpara>Now, suppose your repository contains commits from the following authors:</simpara>
<literallayout>nick1 &lt;bugs@company.xx&gt;
nick2 &lt;bugs@company.xx&gt;
nick2 &lt;nick2@company.xx&gt;
santa &lt;me@company.xx&gt;
claus &lt;me@company.xx&gt;
CTO &lt;cto@coompany.xx&gt;</literallayout>
<simpara>Then, you might want a <literal>.mailmap</literal> file looking like:</simpara>
<literallayout>&lt;cto@company.xx&gt;                       &lt;cto@coompany.xx&gt;
Some Dude &lt;some@dude.xx&gt;         nick1 &lt;bugs@company.xx&gt;
Other Author &lt;other@author.xx&gt;   nick2 &lt;bugs@company.xx&gt;
Other Author &lt;other@author.xx&gt;         &lt;nick2@company.xx&gt;
Santa Claus &lt;santa.claus@northpole.xx&gt; &lt;me@company.xx&gt;</literallayout>
<simpara>Use hash <emphasis>#</emphasis> for comments, either on their own line, or after the email address.</simpara>
</simplesect>
<simplesect id="_author">
<title>Author</title>
<simpara>Written by Jeff Garzik &lt;<ulink url="mailto:jgarzik@pobox.com">jgarzik@pobox.com</ulink>&gt;</simpara>
</simplesect>
<simplesect id="_documentation">
<title>Documentation</title>
<simpara>Documentation by Junio C Hamano.</simpara>
</simplesect>
<simplesect id="_git">
<title>GIT</title>
<simpara>Part of the <xref linkend="git(1)"/> suite</simpara>
</simplesect>
</article>
