Skip to content

Instantly share code, notes, and snippets.

@bmegli
Created February 1, 2022 09:36
Show Gist options
  • Save bmegli/41416aed5b9a3cca77aa784e9f3c1a21 to your computer and use it in GitHub Desktop.
Save bmegli/41416aed5b9a3cca77aa784e9f3c1a21 to your computer and use it in GitHub Desktop.
Moving git tag to different commit
git tag -d <tagname>                  # delete the old tag locally
git push origin :refs/tags/<tagname>  # delete the old tag remotely
git tag <tagname> <commit>          # make a new tag locally
git push origin <tagname>             # push the new local tag to the remote 

Source

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