Lesson 14 · Everyday work
Tags, annotations and release naming
Create an annotated v0.1.0 at the inspected main commit and push only that tag to the local origin. Distinguish a tag object from a branch, signature and hosted release.
- Level: Intermediate
- 6 min read
- 4 min video
- Updated
- Before this lesson: Push commits and publish a branch
Progress saved in this browser.
Playing loads the video from YouTube (privacy-enhanced mode).
What you will learn
- Create an annotated tag with a deliberate message.
- Verify tag object and peeled commit separately.
- Push one explicit tag without all-tag publication.
- Keep tag creation distinct from a hosted release.
Before you start
Start where lesson 13 ended: main/H7 clean, server main H7, feature published at F1; no v0.1.0 tag exists. Local demo tag signing is explicitly not requested.
The video was recorded with Git 2.52.0 and GitTree 2.0 on Ubuntu 24.04: the tag was created and pushed in the app; the before state, the refused duplicate name and the checks ran in the terminal. Nothing was run on macOS or Windows, and Ubuntu is the only Linux system recorded. GitTree's source Git floor is 2.39.0.
GitTree asks you to sign in; the Free plan then covers every step here. No provider account, Pro/trial, API credential or internet service is needed. A local bare origin is not GitLab or CI. All identities use example.com; never run this lesson inside a source checkout.
Make mutations through either GitTree or the native path at identical inputs, not both consecutively. Read-only verification can follow either. Any preparation described as terminal work is labeled native preparation, never an invented app feature.
Concept and state effects
A branch normally advances with commits; a release tag is a deliberately stable name. A lightweight tag names an object directly; an annotated tag adds its own tag object, tagger and message.
v0.1.0 names a tag object here. v0.1.0^{} peels it to the commit. Different object IDs for those two layers are expected and do not indicate two releases.
Annotation is not a cryptographic signature. Publishing a Git tag is not creating provider release notes, uploading assets or distributing a desktop release. None of those external actions is performed here.
Create adds refs/tags/v0.1.0 plus a tag object; push adds that selected server tag. HEAD, local branches, index and working files do not move.
Prepare the exact project state
Use original main after lesson 13. Inspect the actual H7 SHA and verify the tag is absent before creating it. Do not add a notebook commit after tagging.
In GitTree
Palette: Command+Shift+P (Ctrl+Shift+P on Ubuntu); type the exact named command and select it. Named-ref actions use that row's context menu, not an argument-free palette shortcut.
- Select the actual main/H7 graph row (docs: add Leo's review reminder); confirm its footer change and identity, then right-click it.
- Open Tag Here and choose Create Annotated Tag Here… (the row's menu also lists a plain Create Tag Here…, which makes a lightweight tag). The dialog is titled “Create an annotated tag at” the commit's short id.
- Set Tag name v0.1.0 and Message First usable GitTree Features course checkpoint.
- Under Signing the choices are Follow Git config, Sign this tag and Don’t sign this tag; the dialog notes that Git config does not sign tags (tag.gpgSign is not set). Select Don’t sign this tag for this explicit unsigned lesson; do not change global signing config.
- Click Create Tag once and wait; confirm v0.1.0 labels the intended commit without changing checkout.
- In the side panel's Tags group, right-click v0.1.0 → Push Tag (the same menu also offers Delete Tag… and Delete Tag from Remote…, which this lesson does not use). The notice reads “Pushed tag v0.1.0.”
- Verify native tag object type, message and peeled commit plus server tag identity; do not confuse annotation with signing.
- Leave main clean and the tag unchanged. Do not use Push All Tags or create a provider release.
For every ordinary commit: Summary is the stated subject; Description empty; Amend Previous Commit, Skip Hooks, Add Signed-off-by, Different Author, Push After Commit and Allow Empty Commit off; no co-authors. Stage only the named files, then Commit Changes to N Files once (File for one), or Command+Enter as an alternative. Wait for the real result. A lesson that explicitly amends changes only that stated option.
In the terminal
Native equivalent at clean main:
git tag --annotate --no-sign v0.1.0 --message "First usable GitTree Features course checkpoint"
git cat-file -t v0.1.0
git for-each-ref --format='%(contents:subject)' refs/tags/v0.1.0
git rev-parse 'v0.1.0^{}'
git push --quiet origin refs/tags/v0.1.0
git ls-remote --tags origin refs/tags/v0.1.0 'refs/tags/v0.1.0^{}'
git status --short--annotate has the short form -a (git tag -a v0.1.0 -m "message"), and --message is -m; either way Git stores a tag object with its own message, unlike the lightweight git tag v0.1.0.
Create/push succeed; type and message output:
tag
First usable GitTree Features course checkpointThe peeled SHA equals actual main. ls-remote returns actual tag-object and peeled-commit IDs; record these variable values, not model labels. Final status is empty. Separate duplicate-name attempt:
git tag v0.1.0Actual stderr, exit 128:
fatal: tag 'v0.1.0' already existsThe original tag remains; never use -f to conceal the collision.
Result
Where you end: Annotated v0.1.0 exists locally and on the local bare origin, message First usable GitTree Features course checkpoint, peeled commit H7. Main/HEAD/index/work unchanged; no hosted release or signature claimed.
Common mistakes
- Calling an annotated tag signed.
- Tagging the selected old row instead of main.
- Pushing every local tag unintentionally.
If something goes wrong
Cancel a wrong creation before confirming. If a local tag is wrong, inspect its actual target and whether it was published before any explicit deletion; native duplicate refusal preserves the existing ref.
Check your understanding
Answer each question, then read why. Questions marked “Required” count toward completing the lesson.
0 of 6 correct
Answer the required questions correctly to complete the lesson.
Checked in this browser.
Practice
Verify object type tag, exact annotation, peeled SHA=main and both server tag layers. Predict duplicate refusal while preserving the first tag and clean work.
Your own confirmation: the site cannot see your computer.
To complete the lesson, answer the required questions correctly and confirm the practical exercise.
Recap
- Annotation adds a tag object.
- Push only the chosen tag.
- Git tags and hosted releases differ.
Related
Glossary terms introduced
Annotated tag — وسم مشروح; lightweight tag — وسم خفيف; tagger — منشئ الوسم; peeled commit — الإيداع المحسوم.
Video transcript
The narration of the video, cue by cue.
Show the transcript
- Start from the exact checkpoint.
- Name the branch, index and working version.
- Prepare only the isolated course copy.
- Choose the exact commit before tagging.
- Create an annotated tag at that commit.
- Write the name and meaningful annotation.
- Annotation does not mean cryptographic signing.
- A tag does not switch your branch.
- Push only the named tag.
- Peel the tag to verify its commit.
- Do not invent a hosted release.
- What is v0.1.0 here?
- The verified object type is tag and it peels to main.
- Which claims are justified?
- The unsigned annotation adds metadata but does not move HEAD.
- Does tagging create another main commit?
- The tag ref/object points to an existing commit.
- Reuse the same name without force: result?
- The measured duplicate attempt exited128 and preserved the tag.
- Tag and main IDs differ: corrupt?
- An annotated tag's own object differs from its commit target.
- What proves the result?
- Read both object layers and the actual chosen server ref.
- Verify the actual result, not just a message.
- Predict the changed input before acting.
- Preserve useful work before recovery.
- Prove the checkpoint before continuing.
- Keep the verified result for the next step.