Why should I care about lightweight vs. annotated tags?

前端 未结 9 1659
天命终不由人
天命终不由人 2020-11-27 09:29

I switched from Subversion to Git as my day-to-day VCS last year and am still trying to grasp the finer points of \"Git-think\".

The one which has been bothering me

9条回答
  •  野趣味
    野趣味 (楼主)
    2020-11-27 09:59

    By default, Git only looks at annotated tags as a baseline for commands like git describe. Think of annotated tags as signposts that have enduring meaning to yourself and others, while lightweight tags are more like bookmarks for your later self to find. Hence, annotated tags are worth using as a reference, while lightweight tags shouldn't be.

    Signing a tag is an assurance of the signer's identity. It lets users verify, for example, that the Linux kernel code they've picked up is the same code that Linus Torvalds actually released. The signature can also be an assertion that the signer is vouching for the software's quality and integrity at that commit.

提交回复
热议问题