Hacker News new | past | comments | ask | show | jobs | submit login
Do signed/annotated Git tags have any special advantage over lightweight tags?
9 points by pyeri 3 months ago | hide | past | favorite | 1 comment
I'd been using the normal `git tag -m <something>` 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:

    git tag -m "v1.0" -a "v1.0"
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/releases/tags somewhat differently in any situation? I'm asking from a more pragmatic or utilitarian perspective.



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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: