问题
Will assigning at tag (e.g. v1.1.0) to a Github release also assign it to the commit, assuming that the specified commit doesn't already have a tag? If so, will it be a lightweight or annotated tag?
回答1:
Will assigning at tag (e.g. v1.1.0) to a Github
releasealso assign it to thecommit
Yes it will.
If so, will it be a
lightweightorannotatedtag?
A lightweight one.
You can take a look at this sample release that I've created through GitHub UI for the sake of answering this question. This repository wasn't previously bearing any tag.
Once locally fetched, one can see that a new tag has been added upstream.
$ ls .git/refs/tags/
v0.1
And that this tag directly points to a commit (ie. It's a lightweight tag, not an annotated one).
$ cat .git/refs/tags/v0.1
485750d2def0e01f5653534659d1785be0ff73db
$ git cat-file -t 48575
commit
来源:https://stackoverflow.com/questions/23048947/will-assigning-at-tag-to-a-github-release-also-assign-it-to-the-commit