How to Rename Tag in GIT?

Connect with

Renaming a tag in git is very simple and straight forward.

On terminal run below command , step by step for Renaming in GIT

Step #1

git checkout TAG_NAME
(EX: git checkout XYZ)

Step #2

git tag NEW_TAG_NAME OLD_TAG_NAME
##for example: git tag ABC XYZ

here, XYZ is the tag name.

Step #3

git tag -d OLD_TAG_NAME
##for example: git tag -d XYZ

Step #4

git push origin :refs/tags/OLD_TAG_NAME

Step #5

 git push --tags

Connect with

Leave a Reply

Your email address will not be published. Required fields are marked *