Get latest git tag on master branch with bash

git describe origin/master

Warning: If there are multiple tags (local or remote) for the HEAD of origin/master you will get one tag from this command, not a list.

I recommend using the –match parameter to make sure you get the tag you expect:

git describe origin/master --match="v*"


Leave a Reply

Your email address will not be published. Required fields are marked *