File: git-rename-tag

package info (click to toggle)
git-extras 1.7.0-1.2
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 696 kB
  • sloc: sh: 381; makefile: 52
file content (12 lines) | stat: -rwxr-xr-x 236 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
#!/bin/bash

old=$1
new=$2

test -z $old && echo "old tag name required." 1>&2 && exit 1
test -z $new && echo "new tag name required." 1>&2 && exit 1

git tag $new $old
git tag -d $old
git push origin $new
git push origin :refs/tag/$old