Skip to content

Instantly share code, notes, and snippets.

@tjmcewan
Created February 19, 2015 09:14
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 tjmcewan/d5e0e425b189fb080bc5 to your computer and use it in GitHub Desktop.
Save tjmcewan/d5e0e425b189fb080bc5 to your computer and use it in GitHub Desktop.
find the 10 longest git commit **messages** (not changesets) in a repo
git log --pretty=oneline --abbrev-commit | awk '{print length() "\t" $1 }' | sort -rn | head -n 10
@segevofer
Copy link

Thanks for this chunk of code!

This didn't work for me because of the --pretty=oneline that will ignore multi-line commit messages.

@djeikyb
Copy link

djeikyb commented Oct 6, 2022

This snippet didn't work for me either, so I tried my own hand at it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment