Skip to content

Instantly share code, notes, and snippets.

@Dunnzilla
Created February 25, 2015 20:29
Show Gist options
  • Save Dunnzilla/2f9476803d1b42bebe05 to your computer and use it in GitHub Desktop.
Save Dunnzilla/2f9476803d1b42bebe05 to your computer and use it in GitHub Desktop.
Git update tag
git push --delete origin yourAmazingTag
git tag -f yourAmazingTag
git push --tags
@Dunnzilla
Copy link
Author

As a bash file, with an option to just see the commands above or to actually run them:

#!/bin/sh
NEWTAG=$1
GO=$2

if [ "$GO" == "--go" ]; then
        echo "About to run this:"

        echo "git push --delete origin $NEWTAG"
        echo "git tag -f $NEWTAG"
        echo "git push --tags"

        echo "[CR]"
        read unused

        git push --delete origin $NEWTAG
        git tag -f $NEWTAG
        git push --tags

        exit 1;

fi

echo "Run this:"

echo "git push --delete origin $NEWTAG"
echo "git tag -f $NEWTAG"
echo "git push --tags"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment