Can tags be automatically moved after a git filter-branch and rebase?

I’ve written a script that does this.

$ git-rebase-tags master
Rebasing 107 tags onto 'master'
Can't rebase tag 'staging-deploy-01' because there are no identical commits on 'master'
Pointed tag 'v0.0.11' at commit 81e16f2ca1bc7802547bf19c1dba1a68212eafff
Pointed tag 'v0.0.12' at commit 17051cc28084dd56ae56e96767bceee46217c02d
Pointed tag 'v0.0.13' at commit 5d795076ba4b33f81d327dcf9bff727cef7771a2
[...]

See gist.github.com/908381.

But even better, use the --tag-name-filter option built into git-filter-branch(1).

Leave a Comment