Skip to content

Instantly share code, notes, and snippets.

@ultim8k
Forked from lucijafrkovic/git_retag
Last active June 7, 2024 13:28
Show Gist options
  • Save ultim8k/766acb389d00b535ae534d5ec547a5e8 to your computer and use it in GitHub Desktop.
Save ultim8k/766acb389d00b535ae534d5ec547a5e8 to your computer and use it in GitHub Desktop.
Retagging on git
1. list all remote tags
git ls-remote --tags
2. delete local tag
git tag -d v1.0.1
3. push tag deletion to remote
git push origin :refs/tags/v1.0.1
4. tag local branch again
git tag v1.0.1
5. push tag to remote
git push origin tag v1.0.1
@baryshainulin
Copy link

Friend, makes sense to put git fetch origin --prune --tags to sync local tags?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment