Skip to content

Instantly share code, notes, and snippets.

@peerapach
Created September 5, 2019 12:19
Show Gist options
  • Select an option

  • Save peerapach/2745d9e6c2c60ffcc2f34b2d596d2d83 to your computer and use it in GitHub Desktop.

Select an option

Save peerapach/2745d9e6c2c60ffcc2f34b2d596d2d83 to your computer and use it in GitHub Desktop.
# Get latest Git tag
git describe --tags $(git rev-list --tags --max-count=1)
# Get Previous Git Tag (from latest tag)
git describe --abbrev=0 --tags $(git rev-list --tags --skip=1 --max-count=1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment