Git - renaming an git tag

How to rename a git tag

First rename the old tag to new tag

git tag new-tag old-tag

Delete the old tag

git tag -d old-tag

Deleted tag 'old-tag' (was cb63c48)

If tag has been pushed under your remote git server, you have another 2 steps

git push origin :refs/tags/old-tag

To remote server git repository
- [deleted] old-tag

git push origin --tags

Counting objects: 1, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (1/1), done.
Writing objects: 100% (1/1), 397 bytes | 397.00 KiB/s, done.
Total 1 (delta 0), reused 0 (delta 0)
To remote server git repository
* [new tag] new-tag -> new-tag