Reputation: 83587
I created a tag in my local repo and pushed it to a remote one. Then I found some additional changes that belonged with that tag. So I commited the changes and moved the tag in my local repo. Now the tag is empty on the remote repo. How do I update the tag on the remote repo to point to the same commit that it does in my local repo?
Upvotes: 1
Views: 136
Reputation: 1329890
Note that git1.8.2 mentions will impose the use of the --force (-f) option:
"
git push $there tag v1.2.3
" used to allow replacing a tagv1.2.3
that already exists in the repository $there, if the rewritten tag you are pushing points at a commit that is a decendant of a commit that the old tagv1.2.3
points at.This was found to be error prone and starting with this release, any attempt to update an existing ref under
refs/tags/
hierarchy will fail, without "--force
".
Upvotes: 1
Reputation: 20396
git push origin tag_name
if the change of tag is non-fast-forward, add force option
git push -f origin tag_name
Upvotes: 1