Skip to content

Instantly share code, notes, and snippets.

@octavian-nita
Created December 14, 2018 10:35
Show Gist options
  • Save octavian-nita/8134662f0a00c9e880ac5b3b5e91546a to your computer and use it in GitHub Desktop.
Save octavian-nita/8134662f0a00c9e880ac5b3b5e91546a to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
# Consider writing robust bash shell scripts ( http://mywiki.wooledge.org/ ;)
set -o nounset
# ----------------------
# Command line arguments
# ----------------------
[[ $# -ge 1 ]] || { printf "\nusage:\n\t`basename ${BASH_SOURCE}` <tag-name-1> <tag-name-2> ...\n" 1>&2; return 1; }
declare -a TAG_NAMES=( "$@" )
# ----
# Main
# ----
for T in ${TAG_NAMES[*]}; do
# locally
git tag --delete "${T}"
# remotely
git push --delete origin "${T}"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment