Skip to content

Instantly share code, notes, and snippets.

@customcommander
Last active December 16, 2020 23:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save customcommander/58b4ddf2452b206a430cdaf04b0287f7 to your computer and use it in GitHub Desktop.
Save customcommander/58b4ddf2452b206a430cdaf04b0287f7 to your computer and use it in GitHub Desktop.

Git Mining

Some scripts I use to mine data out of my Git repositories. Sharing in case it is useful to others.

Last commit for each year/month

git log --format="%cd %h" --date=short | sort -t- -k1,1n -k2,2n -u

Example of output:

2020-01-31 e2e2f6365
2020-02-28 89186cda9
2020-03-31 a474f16b5
2020-04-30 50bdad416
2020-05-29 c07e4cdad
2020-06-30 73924becb
2020-07-31 440d68d14
2020-08-31 2e48dd898
2020-09-30 b7a180163
2020-10-30 1382b7868
2020-11-30 b16a5c6c4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment