Get the highest semantic versioning tag in a GIT repository
By default the command "git tag" shows all tags of a repository, but sorted alphabetically. So if you have tags like "0.1.0", "0.9.0" and "0.10.0", they will be in the order:
0.1.0
0.10.0
0.9.0To get the highest semantic versioning tag, use this short but very powerful command:
git tag | sort -r --version-sort | head -n1Written by Pieter Vogelaar
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
 #Git 
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#

 
 
 
