Last active
August 29, 2015 14:15
-
-
Save dac09/fcf0f1e9c1cb011ef5bc to your computer and use it in GitHub Desktop.
Move git tag if it exists
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
#Do this before the new commit | |
tag=$(git tag -l --contains HEAD) | |
# -- After the commit -- | |
if [[ -n $tag ]]; then | |
echo "Tag found, moving it" | |
git tag -d $tag | |
git tag $tag | |
fi | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment