Skip to content

Instantly share code, notes, and snippets.

@samvrlewis
Last active January 18, 2024 12:48
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save samvrlewis/a4545386adb99556e7ff629d377e1769 to your computer and use it in GitHub Desktop.
Save samvrlewis/a4545386adb99556e7ff629d377e1769 to your computer and use it in GitHub Desktop.
Get the longest git commit messages
git rev-list --no-merges "${1:-HEAD}" | while read rev; do echo "$(git show -s --format='%b' $rev | wc -w) words: $rev"; done | sort -rn | head -6 | cut -f2 -d: | xargs -I{} git rev-list --pretty=medium {} --max-count=1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment