Last active
May 9, 2017 23:55
-
-
Save developerdino/9fa6646c5e04b54edfc04dc679d08540 to your computer and use it in GitHub Desktop.
Handy GIT Commands
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
| # remove all tags from origin that end in digits (/[0-9]*) | |
| # remove --dry-run to actually do the deletions | |
| git ls-remote --tags | grep -o 'refs/tags/.*/[0-9]*' |sort -r |xargs git push --dry-run --delete origin | |
| # sync all remote tags with your local repo so you don't push them all back up to the remote | |
| 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