>_ IzzyLab

Hands-on task

This task is step 11 of the course “Everyday Git”

Tag a release

easy~7 min

The project project lives in GitLab and is cloned to /root/project (the web sign-in is on the GitLab tab). Mark the current commit with an annotated tag v1.0 with the message first release and push the tag to GitLab.

Then find the tag in the web UI: Code → Tags shows its message and commit.

What you'll practise:
  • git tag
  • annotated tags
  • releases
  • git push
  • GitLab

Topic breakdown

A tag in git is a named pointer to a commit, but there are two kinds. A lightweight tag is just a label on a hash, with no metadata of its own; an annotated tag is a standalone object in the git database with its own author, date, and message, which is why it's the right choice for marking releases. The difference is set by flags of the git tag command, and the type of the resulting object can always be checked with git cat-file -t.

What's checked

  1. tag v1.0 is in GitLab
  2. tag v1.0 is annotated
  3. tag message is first release
  4. tag is on the latest commit of main

What it looks like