Created
September 2, 2016 21:07
-
-
Save mLuby/75775e43f1ac5a86aaec4410be80eab4 to your computer and use it in GitHub Desktop.
rename git tags
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
# tag a specific commit | |
git tag v1.7.1 4e13624 | |
# rename a tag | |
old="1.7.1" | |
new="v1.7.1" | |
echo "$old -> $new" | |
git tag $new $old | |
git tag -d $old # delete the old tag locally | |
git push origin :refs/tags/$old # delete the old tag on remote | |
# update remote with new tags | |
git push --tags |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment