Skip to content

Instantly share code, notes, and snippets.

@namuan
Created February 12, 2019 17:01
Show Gist options
  • Save namuan/798b7c4ba0db82f7aadecc0fbbb5e0fa to your computer and use it in GitHub Desktop.
Save namuan/798b7c4ba0db82f7aadecc0fbbb5e0fa to your computer and use it in GitHub Desktop.
Re-do Git tag (Delete and re-add)
# 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