Show pageOld revisionsBacklinksBack to top This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. ===== Overview ===== Most useful options for ''git shortlog'', using "Pro Git" book repo as an example. ===== SYNOPSIS ===== Part of it: <code> git shortlog [<options>] [<revision range>] [[--] <path>...] </code> ===== (Some) OPTIONS ===== <code> -n, --numbered Sort output according to the number of commits per author instead of author alphabetic order. -s, --summary Suppress commit description and provide a commit count summary only. ... snip ... <revision range> Show only commits in the specified revision range. When no <revision range> is specified, it defaults to HEAD (i.e. the whole history leading to the current commit). origin..HEAD specifies all the commits reachable from the current commit (i.e. HEAD), but not from origin. For a complete list of ways to spell <revision range>, see the "Specifying Ranges" section of gitrevisions(7). [--] <path>... Consider only commits that are enough to explain how the files that match the specified paths came to be. </code> ===== Examples ===== Default output: <code> $ git shortlog 4wk- (1): 4wk: ajusting the documentation - see #1053 and #1054 Adam Laflamme (1): - Fixed a typo in hooks.asc. Issue #1169. Adrien Ollier (42): removed and ignored Gemfile.lock added escaped quotation marks for git commit's message. added a new section for Git as a client for a Bazaar repository added a new section to import a Bazaar repository into a Git repository Modifications done as per Ben's suggestions. minor modifications removed trailing spaces ... snip ... </code> Sort according to contributions: <code> $ git shortlog -n Ben Straub (803): Fix markdown H4's (convert into asciidoc H5's) Remove trailing spaces Add remaining headers to outline GitHub is a chapter Tweak github chapter Three trees Add some things Feedback ... snip ... </code> Just print a summary: <code> $ git shortlog -n -s 803 Ben Straub 306 Scott Chacon 105 Robert P. J. Day 52 Jean-Noël Avila 50 Cory Donnelly 42 Adrien Ollier 24 Kaartic Sivaraam 20 Yue Lin Ho 11 Markus KARG 10 Kyrylo Yatsenko 10 Sanders Kleinfeld ... snip ... </code> Don't count merge commits: <code> $ git shortlog -n -s --no-merges 803 Ben Straub 306 Scott Chacon 105 Robert P. J. Day 52 Jean-Noël Avila 50 Cory Donnelly 42 Adrien Ollier 24 Kaartic Sivaraam 20 Yue Lin Ho 11 Markus KARG 10 Kyrylo Yatsenko 10 Sanders Kleinfeld ... snip ... </code> Restrict to a pathspec: <code> $ git shortlog -n -s --no-merges -- images 5 Scott Chacon 2 Adrien Ollier 1 Ben Straub 1 Duncan Dean 1 Yunhai Luo $ </code> git_shortlog.txt Last modified: 2019/03/18 12:45by rpjday