When a merge request on GitLab has been performed with deleting the branch,
the local branch is not deleted.
Move to the main branch and delete the branch e.g. dev-hotfix.
git checkout main
git fetch --prune
git pull origin main
git branch -d dev-hotfix
Fetch all changes check out the branch if not the current one and hard reset the branch using the main branch.
git fetch origin
git checkout dev-hotfix
git reset --hard origin/main
The branch can now be pushed to the remote repository again.
git push origin dev-hotfix
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
maingit log --pretty=format:"%s" $(git merge-base main HEAD)..HEAD