How to loop through git tags

Viewed 1737

I did some svn to git migration. All my tags look 'strange' now:

7.18.2.0@3000
7.18.3.0@3000
7.18.4.0@3000
7.18.5.0@3000

But the tags are right. Only the name is wrong. Now I want to rename the tags.

So for every tag I want to do:

git tag new old
git tag -d old
git push origin :refs/tags/old
git push --tags

I want to script this. But I'm already stuck to find the right way how to iterate through all my tags.

How do I have to loop: for every tag do...

1 Answers
Related