We use TeamCity to compile and generate packages for DNN Platorm. TeamCity has the option to tag the repository with every build it generates. Since we had this option enabled for a long time, we were having several tags created on our Github repository. Ernst Peter Tamminga suggested that we cleanup these tags before they go out of control. Don't get me wrong, TeamCity is an awesome tool and we an essential part of the development process at DNN Corp.
Before Cleanup
Prior to the cleanup we had close to 3500 tags.
Tools Used
I found the following two blogs to narrow down on my command line to perform the cleanup in a loop
Command Line
Here is my simple command line that did the trick. Note I supplied *-alpha to apply it on alpha tags only.
$ git ls-remote --tags origin | awk '/^(.*)(\s+)(.*-alpha)$/ {print ":" $2}' | xargs git push origin
After Cleanup
We have less than 100 Releases / Tags left.
How to remove those Tags from your local repository
Best to delete your DNN Platform repository and re-clone. It can take a while though.
What's the difference between Tag and Release on GitHub
This stackoverflow item explains it really well:
A tag
is a git concept whereas a Release
is GitHub higher level concept.
A Release
is created from an existing tag
and exposes release notes and links to download the software or source code from GitHub.
What's next
We'll work with DNN MVPs to have a better tag / release management for DNN Platform