Last active
September 28, 2018 12:28
-
-
Save regme/94c5554dcfcca99e3690edfa87671c2b to your computer and use it in GitHub Desktop.
drop all tags from git except 100 last
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git tag | grep -E "^[[:alpha:]]" | xargs -n 1 git push --delete origin & git tag | grep -E "^[[:alpha:]]" | xargs git tag -d | |
git tag | head -n -100 | xargs -n 1 git push --delete origin & git tag | head -n -100 | xargs git tag -d | |
git fetch --prune origin "+refs/tags/*:refs/tags/*" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
then all developers should run:
git tag -l | xargs git tag -d
git fetch --tags