How to rename a Git tag?

To rename a Git tag from old to new:

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

Found here.