Git – how to determine the committers or authors in a Git repository by Lars Vogel

If you want to identify the people which contribute to a Git repository you can use the following command line.

git shortlog -sn or if you want to include the email
git shortlog -sne

About Lars Vogel

Lars Vogel is the founder and CEO of the vogella GmbH and works as Eclipse and Android consultant, trainer and book author. He is a regular speaker at international conferences,

He is the primary author of vogella.com. With more than one million visitors per month this website is one of the central sources for Java, Eclipse and Android programming information.

This entry was posted in Other. Bookmark the permalink.

6 Responses to Git – how to determine the committers or authors in a Git repository by Lars Vogel

  1. jotomo says:

    Or just use ‘git shortlog -sne’ 🙂

  2. Lars Vogel says:

    @jotomo Nay, thats too easy. 😉

  3. Good one (although jotomo’s shortcut is slightly less verbose 😉 ). Minor addition: the statement you show is not c&p-able into the command line. Something has turned the –raw into a -raw and the special quotation marks don’t seem to be supported by all shells (does not work on Mac Terminal ;).

  4. Johnathan says:

    You are right Oliver… its not working on my Redhat Linux too..

    git log –raw | grep “^Author: ” | sort | uniq -c
    grep: ”: No such file or directory
    fatal: ambiguous argument ‘–raw’: unknown revision or path not in the working tree.
    git log –raw | grep “^Author: ” | sort | uniq -c
    grep: ”: No such file or directory
    fatal: ambiguous argument ‘–raw’: unknown revision or path not in the working tree.

  5. Lars Vogel says:

    I changed it to git -shortlog -sne so all bash problems should be gone.

  6. jotomo says:

    @lars shortlog is a git command, not an option. The -n option sorts the result by number of commits btw.

Comments are closed.