-
-
Save rnag/1e2221a5df962fb997083e83ca034762 to your computer and use it in GitHub Desktop.
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
# delete and re-create the latest tag on remote | |
rmtag () { | |
export TAG=$(git describe --tags --abbrev=0) | |
git tag -d $TAG | |
git tag $TAG | |
git push origin :$TAG | |
git push origin $TAG | |
} |
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
1. While still on any branch | |
# TAG=v1.1 | |
export TAG=$(git describe --tags --abbrev=0) | |
git tag -d $TAG | |
2. Create the tag again: This will "move" the tag to point to your latest commit on that branch | |
git tag $TAG | |
3. Delete the tag on remote | |
git push origin :$TAG | |
4. Create the tag on remote | |
git push origin $TAG |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment