Reputation: 1920
I'm my git repo I've tag1
, tag2
and tag3
set by another user. I want to remove them from my computer.
I type git tag -d tag1
, git tag -d tag2
and git tag -d tag3
in git bash.
So when I check the log they've disappeared but trying to push the tags using git push origin --tag
it says everything is up to date but when pulling, I get the tags back.
I also want to add that I use git push origin --tag
to push newly created tags and it works fine.
Why don't my tags get deleted?
Upvotes: 2
Views: 761
Reputation: 12170
A sure way to delete tags you've deleted locally on the remote is:
git push origin -f +refs/tags/*:refs/tags/*
Upvotes: 2
Reputation: 142632
You need to push the deleted tags:
git push origin :refs/tags/<tag name>
git push origin :<tag name>
or:
git push --delete origin refs/tags/<tag name>
git push --delete origin <tag name>
Upvotes: 2