Skip to content

Instantly share code, notes, and snippets.

@mLuby
Created September 2, 2016 21:07
Show Gist options
  • Save mLuby/75775e43f1ac5a86aaec4410be80eab4 to your computer and use it in GitHub Desktop.
Save mLuby/75775e43f1ac5a86aaec4410be80eab4 to your computer and use it in GitHub Desktop.
rename git tags
# 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