'git' Tags

List all existing tags with type, annotated or lighweight:

git for-each-ref refs/tags

Or to check the type of a single tag tagname:

git cat-file -t tagname

If the reported type is tag, it's an annotated tag, i.e. a git object incuding the tagger and a tag message.

If the reported type is commit, it's lightweight, i.e. just a pointer to the specified commit.

Force-synchronize tags from a remote, even if a local tag with the same tag name already exists:

git fetch origin --tags --force

Martin Burnicki martin.burnicki@burnicki.net, last updated 2022-08-10

  • miscellaneous_tips/20_software_development/git_notes/git_tags.txt
  • Zuletzt geändert: 2022-08-10 18:26
  • von martin