Skip to content

Instantly share code, notes, and snippets.

@dac09
Last active August 29, 2015 14:15
Show Gist options
  • Save dac09/fcf0f1e9c1cb011ef5bc to your computer and use it in GitHub Desktop.
Save dac09/fcf0f1e9c1cb011ef5bc to your computer and use it in GitHub Desktop.
Move git tag if it exists
#Do this before the new commit
tag=$(git tag -l --contains HEAD)
# -- After the commit --
if [[ -n $tag ]]; then
echo "Tag found, moving it"
git tag -d $tag
git tag $tag
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment