Skip to content

Instantly share code, notes, and snippets.

@innocarpe
Created October 16, 2024 12:34
Show Gist options
  • Save innocarpe/d728040109f66c39c0dec39c75fb9c73 to your computer and use it in GitHub Desktop.
Save innocarpe/d728040109f66c39c0dec39c75fb9c73 to your computer and use it in GitHub Desktop.
git-tagp
#!/bin/bash
# This command pushs 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-tagp
# 4. Use the command 'git tagp TARGET_TAG'
TARGET_TAG=$1
git tag $TARGET_TAG
git push origin $TARGET_TAG
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment