TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Do signed/annotated Git tags have any special advantage over lightweight tags?

9 点作者 pyeri11 个月前
I&#x27;d been using the normal `git tag -m &lt;something&gt;` command over the years to create tags and releases for even my open source side projects. But today I learned that such tags (unsigned or non-annotated) are supposed to be used only for private or temporary use. And we are supposed to do the following instead so that the tags actually get signed with our identity:<p><pre><code> git tag -m &quot;v1.0&quot; -a &quot;v1.0&quot; </code></pre> The `-a` tag can be used to add useful notes to the commit apparently. But apart from that, do you see any special advantages, especially when pushing code to Github? Is Github going to treat annotated code&#x2F;releases&#x2F;tags somewhat differently in any situation? I&#x27;m asking from a more pragmatic or utilitarian perspective.

1 comment

StringyBob11 个月前
I don’t use GitHub in my day to day work, but since I don’t see any other answers: for me the main reason it to prove the tag hasn’t been changed under me feet. It’s too easy for a lightweight tag to be changed without you knowing, whereas an annotated tag has some permanence of a date, comment, sha, author etc.