SUPPORT THE SITE WITH A CLICK

Subscribe Rss:

SUPPORT THE SITE WITH A CLICK

Sunday, July 3, 2011

Rename a tag in Git

For deleting the renaming the tag from local or remote, first we have map it to the new tag.So lets map the new one with the old one.

$git tag v0.1.0 velo.0.1

Now the new tag references to the old one.Push the new one to the remote.
$git push --tags
Total 0 (delta 0), reused 0 (delta 0)
To git@github.com:judearasu/BloggerR.git
 * [new tag]         v0.1.0 -> v0.1.0
Now we need know how to delete the old tag in Git.
$git tag -d velo.0.1
Although we have deleted the old tag, it was removed from local repository not from remote.
Now try "git push –tags origin master" to delete the tag from the remote server.
git push origin :refs/tags/velo.0.1
This will delete the tag in the remote server

No comments :

Post a Comment