Git:git shortlogコマンドでコミット数のみを表示する方法

スポンサーリンク

git shortlogコマンドでコミット数のみを表示する方法

git shortlogコマンドでコミット数のみを表示するには-sオプションを指定します。

 

オプションの説明

 -s, --summary
     Suppress commit description and provide a commit count summary only.
 -n, --numbered
     Sort output according to the number of commits per author instead of author alphabetic order.

 

-sオプションを指定した場合(-nはコミット数順に表示するオプション)

$ git shortlog -s -n | head
 22902  Junio C Hamano
  3694  Jeff King
  1926  Johannes Schindelin
  1824  Nguyễn Thái Ngọc Duy
  1401  Shawn O. Pearce
  1117  Linus Torvalds
  1015  René Scharfe
  1005  Ævar Arnfjörð Bjarmason
   954  Michael Haggerty
   855  Jonathan Nieder

 

-sオプションを指定しない場合

$ git shortlog -s | head
Junio C Hamano (22902):
      Typofix in git/show-files.
      No need to clean temp_git_file_* anymore
      ls-tree enhancements
      Add -z option to show-files
      Add "-q" option to show-diff.c
      Add '-z' to merge-tree.c
      Byteorder fix for read-tree, new -m semantics version.
      Add --stage to show-files for new stage dircache.
      Un unoptimize ls-tree behaviour