Created
February 12, 2019 17:01
-
-
Save namuan/798b7c4ba0db82f7aadecc0fbbb5e0fa to your computer and use it in GitHub Desktop.
Re-do Git tag (Delete and re-add)
This file contains hidden or 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
# List tags | |
git tag -l | |
# Delete existing tag | |
git tag -d <tag-name> | |
# Delete tag from remote | |
git push origin :refs/tags/<tag-name> | |
# New tag at HEAD | |
GIT_COMMITTER_DATE="$(git show --format=%aD | head -1)" git tag -a <tag-name> -m"Release <tag-name>" | |
# Push new tag to remote | |
git push origin --tags |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment