Skip to content

Instantly share code, notes, and snippets.

@Just4Ease
Forked from da-n/gist:9998623
Created July 20, 2021 13:28
Show Gist options
  • Save Just4Ease/5e7c56b74b8924d20d6bf1752121646a to your computer and use it in GitHub Desktop.
Save Just4Ease/5e7c56b74b8924d20d6bf1752121646a to your computer and use it in GitHub Desktop.
Rename a tag in git

Rename a git tag old to new:

git tag new old
git tag -d old
git push origin :refs/tags/old
git push --tags

The colon in the push command removes the tag from the remote repository. If you don't do this, git will create the old tag on your machine when you pull.

-- source http://stackoverflow.com/a/5719854/695454

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