Script for fixing a lot of git tags

This post was written by eli on January 23, 2017
Posted Under: Linux,Software

I needed to update a lot of releases, each designated by a tag, with a single fix, which took the form of a commit. This commit was marked with the tag “this”.

for i in $(git tag | grep 2.0) ; do
 git checkout $i
 git cherry-pick this
 git tag -d $i
 git tag $i

This bash script checks out all tags that match “2.0″, and advances it after cherry-picking. Recommended to try it on a cloned repo before going for the real thing, or things can get sad.

Add a Comment

required, use real name
required, will not be published
optional, your blog address

Previose Post: