Skip to content

Instantly share code, notes, and snippets.

@th3terrorist
Created June 12, 2022 11:51
Show Gist options
  • Save th3terrorist/13ad0f5e01febac9ae6161c7ae594a63 to your computer and use it in GitHub Desktop.
Save th3terrorist/13ad0f5e01febac9ae6161c7ae594a63 to your computer and use it in GitHub Desktop.
Rename a given tag with name `old` to `new`
#!/bin/bash
# $1 tag-name to rename
# $2 new tag name
git-tag-rename() {
git tag $2 $1
git tag -d $1
git push origin :refs/tags/${1}
git push --tags
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment