Skip to content

Instantly share code, notes, and snippets.

@AhiyaHiya
Created November 28, 2017 18:37
Show Gist options
  • Select an option

  • Save AhiyaHiya/aaf5b0ec8da488bd7daa3194a0b2139e to your computer and use it in GitHub Desktop.

Select an option

Save AhiyaHiya/aaf5b0ec8da488bd7daa3194a0b2139e to your computer and use it in GitHub Desktop.
set -e
set -u
# https://stackoverflow.com/questions/1028649/how-do-you-rename-a-git-tag
# old_name new_name
rename_git_tag()
{
local readonly old=$1
local readonly new=$2
git tag $new $old
git tag -d $old
}
push_git_tag_to_origin()
{
local readonly old=$1
git push origin :refs/tags/$old
git push --tags
}
rename_git_tag "oldtagname" "feature/newtagname"
push_git_tag_to_origin "oldtagname"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment