-
-
Save ngocson2vn/e2575be6bf31e464a341a8da02c15957 to your computer and use it in GitHub Desktop.
overriding old tag (move tag to latest commit)
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
Use the -f option to git tag: | |
-f | |
--force | |
Replace an existing tag with the given name (instead of failing) | |
You probably want to use -f in conjunction with -a to force-create an annotated tag instead of a non-annotated one. | |
Example | |
Delete the tag on any remote before you push | |
git push origin :refs/tags/<tagname> | |
Replace the tag to reference the most recent commit | |
git tag -fa <tagname> | |
Push the tag to the remote origin | |
git push origin master --tags |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment