Skip to content
The Git Crypt

/static/cripta/en/ossada/shortlog-sn/

Menu

GIT-009 · Archaeology

git shortlog -sn

The dig's census: who dug, and how many times.

shortlog groups history by author; -s reduces each one to a count and -n sorts from largest to smallest. One line per person, and the whole repository becomes a census.

It is how you meet a freshly cloned project — who its de facto keepers are — and how you slice it: with --since and a path at the end, the question becomes "who tended this folder this year?". The .mailmap file unifies the aliases of anyone who committed under several names.

$ git shortlog -sn --no-merges
   212  Andrey Andrade
    38  Ana Ribeiro
     5  Rafael Costa
The repository reduced to a three-line census.