Skip to content

Instantly share code, notes, and snippets.

View thecb4's full-sized avatar
🏳️‍🌈
All the things

thecb4 thecb4

🏳️‍🌈
All the things
View GitHub Profile
@thecb4
thecb4 / get-latest-tag-on-git.sh
Created March 8, 2018 21:04 — 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
### https://raw.github.com/github/gitignore/32da2f83412ad9aeaaf5316338c50521a6bfd5df/Swift.gitignore
# Xcode
#
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
## Build generated
build/
DerivedData/