-
-
Save matthewmccullough/898798 to your computer and use it in GitHub Desktop.
In case you're looking for a Windows Command version, look at https://gist.github.com/thephpdeveloper/5475696
thanks, this was helpful
This was too slow for me - have a look at this to make it happen much faster http://blog.siyelo.com/how-to-bulk-delete-remote-git-tags
@mrardon Thanks, greatly appreciated link
cool ..thanks ..it was helpful
I've made a (faster) Ruby version inspired in your script. Thanks!
Lovely! Thanks 👍
👍
@mrardon that link was awesome! thanks!! 😄
👍
mrardons version didn't work for me. Luckily I only had a few tags so I just used the slow version.
Thanks for this
First line removes all tags remotly, the next line removes all tags locally
git tag -l | xargs -n 1 git push --delete origin
git tag | xargs git tag -d
It is so convenient! Thanks very much.
@simnalamburt that looks soo destructive, but I like it 😀
@mauris that Gist is a 404 now.
For anybody looking for a Windows version, I created a Gist below with the commands I used to remove all Tags on Windows. The Linux command xargs
would not work. I would get an xargs: cannot fork: Permission denied
error. Figured out I need to use the FOR
command in Windows.
https://gist.github.com/RandomArray/fdaa427878952d9768b0
We use bitbucket to host our git repo, and the commands above didn't work. This one did:
for tag in `git tag -l`
do
git tag -d $tag
git push -v origin :refs/tags/$tag
done
Very useful for cleaning up after testing some CI tools.
git tag -l | xargs -n 1 git push --delete origin
fatal: --delete doesn't make sense without any refs
@jmrobison, thanks, worked!
For the issue with --delete doesn't make sense without any refs
here's how I delete all the tags for 1.3.* :
git ls-remote --tags origin | awk '/^(.*)(1\.3\.\d+)$/ {print ":" $2}' | xargs git push origin
My update to this, deletes last 120 tags