Skip to content

Instantly share code, notes, and snippets.

@innocarpe
Created October 16, 2024 12:35
Show Gist options
  • Save innocarpe/de4d2a8887eb83094bce26f2f1090cb6 to your computer and use it in GitHub Desktop.
Save innocarpe/de4d2a8887eb83094bce26f2f1090cb6 to your computer and use it in GitHub Desktop.
git-tagd
#!/bin/bash
# This command removes local tag + remote tag simultaneously.
# 1. Move this file to ~/.gitsh/
# 2. Add directory path($YOUR_HOME_PATH/.gitsh) to environment variable file
# (like ~/.bash_profile or ~/.zshrc)
# (This would be like 'export PATH=${PATH}:/Users/YOUR_HOME_PATH/.gitsh')
# 3. chmod +x git-tagd
# 4. Use the command 'git tagd TARGET_TAG'
TARGET_TAG=$1
git tag -d $TARGET_TAG
git push origin -d $TARGET_TAG
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment