Skip to content

Instantly share code, notes, and snippets.

@spajus
Created March 21, 2013 14:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save spajus/5213420 to your computer and use it in GitHub Desktop.
Save spajus/5213420 to your computer and use it in GitHub Desktop.
delete all git tags locally and remotely with exclusion list
for t in `git tag`
do
arr=("keep_this" "keep_that" "and this")
if [[ "${arr[@]}" =~ ${t} ]]; then
echo keeping $t
else
git push origin :$t
git tag -d $t
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment