Last active
August 29, 2015 14:13
-
-
Save martijngastkemper/880a1adb35c677d08b9c to your computer and use it in GitHub Desktop.
Checkout a tag or a branch.
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
# version=2.3.4 | |
# version=master | |
if [ "`git tag -l $version`" == "" ]; then | |
git checkout -qf $version | |
git pull -q | |
else | |
versionRef=`git rev-list -n 1 $version` | |
git checkout -qf $versionRef | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment