flmon flmon - 1 year ago 137
Git Question

How to get previous tag name?

There are some tags:

first
second
third
fourth


I need to get the tag before "second" (third).

Answer Source

git describe --abbrev=0 second^

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download