Get The Latest Git Tag in Repository
Below is the example on how to get the most recent tag in repository.
git describe --tags `git rev-list --tags --max-count=1`
The second part of command as below will return the hash of the tag.
git rev-list --tags --max-count=1
Written by Azri Jamil
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Git
Authors
khasinski
591.1K
dmichaelavila
500.4K
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#