Created
January 27, 2021 22:39
-
-
Save apolopena/0eee78478978ab3bc55dea8ce4b20643 to your computer and use it in GitHub Desktop.
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
# @See https://git-scm.com/book/en/v2/Git-Basics-Tagging | |
# Offical docs @see https://git-scm.com/docs/git-tag | |
# Output a list of all tags | |
git tag | |
# Create a local (annotated) tag for the last commit where v1.4 is the tag name and "ver 1.4 stable" is the tag description | |
git tag -a v1.4 -m "ver 1.4 stable" | |
# Create local (annotated) tag from a previous commit where 9fceb02 is the checksum for that commit | |
git tag -a v1.2 9fceb02 | |
# Push local tag to the remote repo when v1.4 is the tag name | |
git push origin v1.4 | |
# Delete local tag where v1.4 is the tag name | |
git tag -d v1.4 | |
# Delete remote tag where origin is the remote name and v1.4 is the tag name | |
git push origin :refs/tags/v1.4 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment