My Profile Photo

Simon Chiu


A software developer's thoughts, stories and ideas.


Deleting all tags in git

I recently mirrored a git repo as opposed to forking it. Unfortunately this meant that I was left with the tedious task of removing all the unwanted tags. Fortunately there are a couple of neat commands out there that will do this for you.

A word of warning though - this can not be undone afterwards!

Deleting all tags remotely

git tag -l | xargs -n 1 git push --delete origin

Deleting all tags locally

git tag | xargs git tag -d
comments powered by Disqus