To list all local tags.
git tag -l
git tag --list
git show-ref --tags
List the tags including the annotated message.
git tag -l -n
git tag --list -n
List tags on remote (GitLab?).
git ls-remote --tags
git ls-remote --tags origin
When a tag is annotated the listing contain also an entry ending with ^{}
.
There are 2 ways of creating a tag, with (annotated) or without (lightweight) a message.
git tag my-tag-name
The Annotated version.
git tag -a my-tag-name -m "My annotated message for this tag."
git tag --annotate my-tag-name --message="My annotated message for this tag."
git pull --tags
In case of a shallow clone it tags are not all retrieved and --force
makes it so.
git pull --tags --force
Update remote having the new created local tags.
git push --tags
When a tag is deleted and created to a different commit hash the remote is not taking it so add the --force
option.
git push --tags --force
Deleting a local tag.
git tag -d my-tag-name
git tag --delete my-tag-name
Deleting a tag on a remote repository.
git push --delete origin my-tag-name
git push origin :my-tag-name
main
git log --pretty=format:"%s" $(git merge-base main HEAD)..HEAD