简体   繁体   English

在GitHub中分配最新版本(不使用git)

[英]Assign the latest release in GitHub (not using git)

Scenario 情境


I have 3 releases of this repository in GitHub : 我在GitHub上有3个版本的此存储库:

( tags and maybe other required related info could be seen by following the url) (可以通过以下网址查看标签以及其他可能需要的相关信息)

The latest release is the v1.2: 最新的版本是V1.2的:

在此处输入图片说明

However, the first version is marked as " Latest Release ": 但是,第一个版本被标记为“ 最新版本 ”:

在此处输入图片说明

Then if I use this url below, I get the earliest version of my releases: 然后,如果我在下面使用此网址,则会获得发布的最早版本:

Question


I wonder if its possibly to set the release that I want it to be the latest release, via the GitHub web, with no complicated things. 我想知道是否有可能通过GitHub网站将我希望它的版本设置为最新版本,并且没有复杂的事情。

Research 研究


When I said "with no complicated things" is because I read this post below on which they comment to use the git console, but really I don't want to depend on git console to be clonning my repository and messing with tags and etc just to set the green indicator of the damn Latest Release . 我说“没有复杂的事情”是因为我在下面阅读了这篇文章,他们在评论中使用了git控制台,但实际上我不想依靠git控制台克隆我的存储库并弄乱标签等设置该死的最新版本的绿色指示器。

That makes me think whether really GitHub doesn't provide any " Set this as the Latest Release " friendly button on their web?, why they don't?, I hope just I'm missing something in their web because this is very annonying for their online users. 这让我想到GitHub是否真的在他们的网站上没有提供任何“ 将其设置为最新版本 ”友好按钮?为什么他们没有?我希望只是我在他们的网站中缺少了一些东西,因为这很烦人给他们的在线用户。

All three of your tags — 1.0, 1.1, and 1.2 — are linked to this commit . 您的所有三个标签-1.0、1.1和1.2-都与此提交链接。 So in this case, all three releases are identical. 因此,在这种情况下,所有三个版本都是相同的。

If you add or merge a new commit on the master branch that's tagged with 1.3, but don't update the last 3 tags, then this will become your latest release. 如果您在master分支上添加或合并带有1.3标记的新提交,但不更新最后3个标记,那么它将成为您的最新版本。

If you tag the commit correctly, git tag --contains should only output the latest tag. 如果正确标记了提交,则git tag --contains仅应输出最新的标记。 However: 然而:

$ git tag --contains
1.0
1.1
1.2

And as you can see, each tag points to the same commit: 如您所见,每个标记都指向相同的提交:

$ git rev-list -1 1.0
6fbce42a8c59b0a06f679a369d19b7a1282023d0
$ git rev-list -1 1.1
6fbce42a8c59b0a06f679a369d19b7a1282023d0
$ git rev-list -1 1.2
6fbce42a8c59b0a06f679a369d19b7a1282023d0

TLDR: Make a new commit, then tag it, and don't update the other tags. TLDR:进行新的提交,然后对其进行标记,并且不要更新其他标记。

Along with all 3 tags being linked to a single commit, I would recommend not creating a new directory for each new release. 除了将所有3个标记链接到一个提交之外,我建议不要为每个新版本创建一个新目录。 git will handle the versioning and tags, you do not need to do so using directory structure. git将处理版本控制和标签,您无需使用目录结构。

Also, i use Source Tree to maintain git repos and tags. 另外,我使用Source Tree来维护git repos和标签。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM