1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

[Git] 月ごとのコミット数を出力する

Last updated at Posted at 2019-10-08

月ごとのコミット数を調べるときに使えます。

CI導入前のコスト算出に使いました。

リポジトリのディレクトリで下記を実行します。

month=("01" "02" "03" "04" "05" "06" "07" "08" "09" "10" "11" "12")
for m in "${month[@]}"
do
  echo "2019-$m\t"$(git log --date=iso --pretty=format:"[%ad] %h %an : %s" | grep 2019-"$m" | wc -l)
done

2重ループにすれば複数年でもチェックできそうです。

参考

1
1
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?