Skip to content

Instantly share code, notes, and snippets.

@bitmvr
Created April 4, 2019 15:23
Show Gist options
  • Save bitmvr/61cccda5a54fe6cdf4d669c0c0c19d38 to your computer and use it in GitHub Desktop.
Save bitmvr/61cccda5a54fe6cdf4d669c0c0c19d38 to your computer and use it in GitHub Desktop.
Tag Erasing Apparatus (TEA) - Quickly remove git tags locally and remotely.
#!/usr/bin/env bash
# TEA: Tag Erasing Apparatus
tag=$1
function delete_local_tag() {
git tag -d "${tag}"
}
function delete_remote_tag() {
git push --delete origin "${tag}"
}
function successful_operation() {
if [ $? -eq 0 ]; then
echo "${1}"
fi
}
delete_local_tag
successful_operation("Local Tag Removed")
delete_remote_tag
successful_operation("Remote Tag Removed")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment