User Tools

Site Tools


git_shortlog

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
git_shortlog [2019/02/28 21:17]
rpjday created
git_shortlog [2019/03/18 12:45] (current)
rpjday [Examples]
Line 3: Line 3:
 Most useful options for ''​git shortlog'',​ using "Pro Git" book repo as an example. 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 ===== ===== (Some) OPTIONS =====
  
Line 28: Line 35:
     Consider only commits that are enough to explain how the     Consider only commits that are enough to explain how the
     files that match the specified paths came to be.     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>​ </​code>​
git_shortlog.1551388671.txt.gz · Last modified: 2019/02/28 21:17 by rpjday