Script for fixing a lot of git tags
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”.
#!/bin/bash for i in $(git tag | grep 2.0) ; do git checkout $i git cherry-pick this git tag -d $i git tag $i done
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.