Skip to content

Instantly share code, notes, and snippets.

View hoangbkit's full-sized avatar
🏠
Working from home

hoangbkit

🏠
Working from home
View GitHub Profile
@hoangbkit
hoangbkit / git-utils.sh
Last active July 31, 2018 04:31 — forked from rponte/get-latest-tag-on-git.sh
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