Top
Twitter
Photos
Thursday
Jun272013

Removing old deployment tags from your repository

At work we use the capistrano-deploytags gem to tag deployments. The idea is to make it easier to cut hot fix branches should the need ever arise. The problem with this is that you end up with a great big pile of tags in your repo.

I don't know if there is any actual downside to having a huge number of repo tags, but it does clutter up the view in graphical git clients such as Tower or SourceTree. So I wanted a way to delete old tags.

Turns out git itself doesn't provide a way to build delete tags, so I came up with this little bit of shell script to do it. It uses egrep to select the tags to delete then removes each in turn.

Change the egrep pattern to match the tags you want to keep.

PrintView Printer Friendly Version

EmailEmail Article to Friend

References (2)

References allow you to track sources for this article, as well as articles that were written in response to this article.
  • Response
    Football is really a single of the largest sports in America. It has a significant following.
  • Response
    Response: backlinks indexed
    Terrific Website, Carry on the beneficial work. Thank you.

Reader Comments

There are no comments for this journal entry. To create a new comment, use the form below.

PostPost a New Comment

Enter your information below to add a new comment.

My response is on my own website »
Author Email (optional):
Author URL (optional):
Post:
 
Some HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>
« Why we should take Abbott's role as Minister for Women seriously | Main | The Finder's Keepers Threshold »