Created
February 4, 2015 07:49
-
-
Save tianp/5abfabc0ef567d49be55 to your computer and use it in GitHub Desktop.
Git Chekout Latest Tag
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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