Skip to content

Instantly share code, notes, and snippets.

@vindia
Created March 9, 2012 12:47
Show Gist options
  • Save vindia/2006390 to your computer and use it in GitHub Desktop.
Save vindia/2006390 to your computer and use it in GitHub Desktop.
Get all the tags a commit is in, with support for version numbers
# Supports versions like 1.3.6. If you need more digits, add more options with the -k flag
git tag --contains 44b09171 | sort -t. -k1,1n -k2,2n -k3,3n
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment