Skip to content

Instantly share code, notes, and snippets.

@nardhar
Created August 18, 2017 21:50
Show Gist options
  • Save nardhar/3a9f6a5aedb28cffa712b7bd34b3c475 to your computer and use it in GitHub Desktop.
Save nardhar/3a9f6a5aedb28cffa712b7bd34b3c475 to your computer and use it in GitHub Desktop.
Replace GIT tag approach

Taken from https://stackoverflow.com/a/24762313/1947087

git tag -d <tagname>
git checkout <new commit or branch>
git tag -a <tagname>
git push <remotename> <tagname> -f

for example:

git checkout 2.0
git tag -d v2.0
git tag -a v2.0 -m"Version 2.0"
git push origin v2.0 -f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment