Skip to content

Instantly share code, notes, and snippets.

@tianp
Created February 4, 2015 07:49
Show Gist options
  • Save tianp/5abfabc0ef567d49be55 to your computer and use it in GitHub Desktop.
Save tianp/5abfabc0ef567d49be55 to your computer and use it in GitHub Desktop.
Git Chekout Latest Tag
# Get new tags from the remote
$ git fetch --tags
# Get the latest tag name
$ latestTag=$(git describe --tags `git rev-list --tags --max-count=1`)
# Checkout the latest tag
$ git checkout $latestTag
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment