git tag 和 release 有什么区别?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/18506508/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
What's the difference between tag and release?
提问by naor
Using GitHub's API, I can't get the releases list, but I can get the tags list.
使用 GitHub 的 API,我无法获取发布列表,但我可以获取标签列表。
What's the difference between them?
它们之间有什么区别?
回答by nulltoken
What's the difference between them?
它们之间有什么区别?
A tag
is a pointer to a specific commit. This pointer can be super charged with some additional information (identity of the creator of the tag, a description, a GPG signature, ...).
Atag
是指向特定提交的指针。该指针可以包含一些附加信息(标签创建者的身份、描述、GPG 签名等)。
A tag
is a git concept whereas a Release
is GitHub higher level concept.
Atag
是 git 概念,而 aRelease
是 GitHub 更高级别的概念。
As stated in the official announcementpost from the GitHub blog: "Releases are first-class objects with changelogs and binary assets that present a full project history beyond Git artifacts."
正如GitHub 博客的官方公告中所述:“发布是具有变更日志和二进制资产的一流对象,它们呈现出超越 Git 工件的完整项目历史。”
A Release
is created from an existing tag
and exposes release notes and links to download the software or source code from GitHub.
ARelease
是从现有的tag
并公开发行说明和链接以从 GitHub 下载软件或源代码。
Using GitHub's API, I can't get the releases list, but I can get the tags list.
使用 GitHub 的 API,我无法获取发布列表,但我可以获取标签列表。
The current version of the GitHub APIdoesn't expose a way to manage Release
s (create, update, ...). I'm pretty sure that this shouldn't take too long before it's exposed.
当前版本的GitHub API没有公开管理Release
s(创建、更新……)的方法。我很确定这不应该在它暴露之前花太长时间。
However, it's currently possible to list the releases and tags of a specific repository.
但是,目前可以列出特定存储库的版本和标签。
For instance, the url below will list the 6 releases(as of today) from ReactiveUI
例如,下面的 url 将列出来自ReactiveUI的6 个版本(截至今天)
Whereas this one will list the 54 tags(as of today) from the same repository
而这个将列出来自同一存储库的54 个标签(截至今天)
Creating a release is currentlyin a process which involves a manual action (adding the release notes, uploading the packages, ...). This explains why tag
s are not transparently seen as Release
s.
创建版本当前处于一个涉及手动操作的过程中(添加版本说明、上传包,...)。这解释了为什么tag
s 没有被透明地视为Release
s。
If you want to be notified of the API changes, you can subscribe to the GitHub API Changes blog.
如果您想收到 API 更改的通知,可以订阅GitHub API 更改博客。
However, if you can't wait, the GitHub API home page states "If you have any problems or requests please contact support.". This can be done through an email to [email protected]or this contact form.
但是,如果您迫不及待,GitHub API 主页会注明“如果您有任何问题或请求,请联系支持人员。”。这可以通过发送电子邮件至[email protected]或此联系表来完成。
Update:
更新:
The GitHub API now allows to manipulate Release
s. See the announcement.
GitHub API 现在允许操作Release
s。见公告。