Skip to content

Instantly share code, notes, and snippets.

Working from home

Hoang Nguyen hoangbkit

Working from home
View GitHub Profile
hoangbkit /
Last active Jul 31, 2018 — forked from rponte/
Getting latest tag on git repository
# The command finds the most recent tag that is reachable from a commit.
# If the tag points to the commit, then only the tag is shown.
# Otherwise, it suffixes the tag name with the number of additional commits on top of the tagged object
# and the abbreviated object name of the most recent commit.
git describe
# With --abbrev set to 0, the command can be used to find the closest tagname without any suffix:
git describe --abbrev=0
# other examples