blob: 282a7ea6d4acbc5ff1329f9399ad54bfe531fbc2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
#!/bin/sh
# git-rename-tag <old-name> <new-name>
# NOTE: This works on the "origin" remote and preserves
# annotations.
set -e
# Creates a new tag on the remote AND removes the old tag
git push origin refs/tags/$1:refs/tags/$2 :refs/tags/$1
# Remove the old local tag
git tag -d $1
# Fetch the new tag
git fetch origin refs/tags/$2:refs/tags/$2
|