To get the most recent tag (example output afterwards):
git describe --tags --abbrev=0 # 0.1.0-dev
To get the most recent tag, with the number of additional commits on top of the tagged object & more:
git describe --tags # 0.1.0-dev-93-g1416689
To get the most recent annotated tag:
git describe --abbrev=0
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…