mirror of
https://github.com/tj/git-extras.git
synced 2026-09-10 07:26:17 -04:00
18 lines
370 B
Bash
Executable file
18 lines
370 B
Bash
Executable file
#!/usr/bin/env bash
|
|
|
|
# Assert there is at least one tag provided
|
|
test -z $1 && echo "tag required." 1>&2 && exit 1
|
|
|
|
# Concatenate all the tag references
|
|
local_tags=""
|
|
origin_refs=""
|
|
for tagname in "$@"
|
|
do
|
|
local_tags=$local_tags" $tagname"
|
|
origin_refs=$origin_refs" :refs/tags/$tagname"
|
|
done
|
|
|
|
# Delete all the tags
|
|
git tag -d $local_tags
|
|
git push origin $origin_refs
|