Created
January 13, 2018 03:29
-
-
Save ZeroDragon/ebcc51592d8e69c68a274cff2e922de6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
echo "Last tag is:" | |
git tag | sed -e '$!d' | |
echo "Want to tag current commit? type the name of the tag (leave empty to skip)" | |
read current | |
if [ "$current" != "" ]; then | |
git tag -a $current | |
fi | |
echo "Type the name of the tag you want to move (leave blank to skip)" | |
read movement | |
if [ "$current" != "" ]; then | |
git tag -af $movement | |
fi | |
read -p "Want to push all updated tags? (y/N)" -n 1 -r | |
echo # (optional) move to a new line | |
if [[ $REPLY =~ ^[Yy]$ ]]; then | |
git push origin :$movement | |
git push --tags | |
fi | |
echo "Done!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment