Replace remote tag with Git

azmeuk picture azmeuk · Nov 19, 2013 · Viewed 27.2k times · Source

I have some tags on my "origin" repository. Then I realized I needed to add some changes on one of the tags, and push them back on my repository. Is there a way I can push an existing tag to the repository in one time, or should I delete the tag before ?

Answer

Bijendra picture Bijendra · Nov 19, 2013

This should not be the practice, though you can delete the tag and push the change to the remote repo.

git tag -d tag1
git push origin :refs/tags/tag1