We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0c743ab commit b219a05Copy full SHA for b219a05
tools/git/scripts/commits_per_month
@@ -0,0 +1,15 @@
1
+#!/usr/bin/env bash
2
+#
3
+# Prints the number of commits per month.
4
+
5
+# * `git log`
6
+# - Show commit logs.
7
+# * `grep Date`
8
+# - Extract the line which begins with `Date` from each log.
9
+# * `awk '{}'`
10
+# - From each date line, extract the month (`$3`).
11
+# * `sort -M`
12
+# - Sort by month name.
13
+# * `uniq -c`
14
+# - Remove repeated lines and count the repeats to show monthly totals.
15
+git log | grep Date | awk '{print $3}' | sort -M | uniq -c
0 commit comments