Skip to content

Instantly share code, notes, and snippets.

@gonzaloserrano
Created October 1, 2013 14:03
Show Gist options
  • Save gonzaloserrano/6778921 to your computer and use it in GitHub Desktop.
Save gonzaloserrano/6778921 to your computer and use it in GitHub Desktop.
Show last 3 git tags plus last tag message
#!/bin/sh
git for-each-ref \
--format='%(taggerdate:iso8601) %(refname:short)' refs/tags |
grep -v '^ ' |
sort |
cut -d' ' -f4- |
tail -n 3
git lgg | head -n 1 | awk -F '=> ' '{print " "$2}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment