# Create an annotated Git tag for a verified revision

Canonical: https://githtml.com/guides/git-create-annotated-tag-deliberately
Published: 2026-11-23
Publisher: WaveTech LLC / gitHtml

An annotated tag records a name, target, tagger information, and message as a Git object. Create it only after verifying the target commit, then inspect it before publishing. A local tag is not automatically a GitHub release or a remote tag. Treat published release tags as stable references unless the project explicitly coordinates a correction.

## Choose the exact release point

A branch moves as new commits arrive; a tag is commonly used as a stable name for a particular revision. Annotated tags add metadata and a message, while lightweight tags are simpler references. For a release or significant milestone, choose the type required by the project and verify the commit before attaching the name.

Do not assume that HEAD is the desired release simply because your working directory looks correct. Uncommitted changes are not included in the target commit. Inspect the recent history, status, and relevant test results. If the release depends on generated files or external artifacts, those need their own validation; a tag does not build, package, or certify them.

## Create and inspect a local tag

The example uses an illustrative version name that must not replace an existing published tag. Check whether the name already exists before creation. The explicit HEAD target is appropriate only after verifying that it is the intended commit. These commands create local metadata but do not upload it.

1. Confirm the tag’s target commit and message, not just that the name appears in a list. A correct version label on the wrong commit is still wrong.
2. If signing is required, follow the project’s established signing setup and verification process rather than assuming annotation itself supplies a cryptographic signature.

````shell
git status --short
git log -1 --oneline
git tag --list v1.2.0
git tag -a v1.2.0 HEAD -m "Release 1.2.0"
git show --no-patch v1.2.0
````

## Publish narrowly and keep references dependable

When authorized and ready, push the specific tag to the verified remote rather than sending every local tag. Check the remote result separately. Creating a hosted release is another operation that may add notes and downloadable assets; it is not implied by the existence of the Git tag. Keep those concepts distinct in release instructions.

If a published tag is incorrect, coordinate with maintainers before moving or deleting it. Consumers may already have cached the old target, and identical tag names resolving to different commits undermine reproducibility. Often a new corrective version is clearer. Record the full commit identifier alongside important release evidence so the result remains unambiguous even when a human-readable label is mistyped. A useful tag is a trustworthy reference to a validated snapshot, not merely a convenient name generated at the end of a command sequence.

Tags do not include untracked build artifacts, issue discussions, or hosting-service settings. Preserve those separately if the release process depends on them for reproducibility or audit.

## Sources and further reading

- [Git reference: git-tag](https://git-scm.com/docs/git-tag)
- [Git reference: git-push](https://git-scm.com/docs/git-push)

## Related guides

- [Make your first Git commit and verify its contents](https://githtml.com/guides/git-create-first-commit-checklist)
- [See staged and unstaged changes with git diff](https://githtml.com/guides/git-diff-staged-versus-unstaged)
- [Understand fast-forward merges and merge commits](https://githtml.com/guides/git-fast-forward-versus-merge-commit)
- [Git fetch vs pull: inspect updates before integrating](https://githtml.com/guides/git-fetch-versus-pull-safely)

Editorial approach: https://githtml.com/guides/about
