使用Git下载特定标签 [英] Download a specific tag with Git
问题描述
我想知道如何下载Git仓库的特定标签 - 它是当前版本的一个版本。
我看到有一个标签为git网页上的旧版本,对象名称为长十六进制数字。
但根据网站的版本名称是标记版本1.1.5
。
我尝试了一个像这样的命令(名称已更改):
git clone http:/ /git.abc.net/git/abc.git my_abc
我确实得到了一些东西 - 一个目录,一堆子目录等。
如果它是整个存储库,我如何获得我正在寻找的版本?如果不是,我该如何下载该特定版本? 会为您提供整个存储库。 克隆完成后,您可以使用 更好的办法是签出并创建一个分支(否则您将位于以修订号命名的分支上): I'm trying to figure out how I can download a particular tag of a Git repository - it's one version behind the current version. I saw there was a tag for the previous version on the git web page, with object name of something long hex number. But the version name is " I tried a command like this (with names changed): And I did get something - a directory, a bunch of subdirectories, etc. If it's the whole repository, how do I get at the version I'm seeking? If not, how do I download that particular version? will give you the whole repository. After the clone, you can list the tags with Even better, checkout and create a branch (otherwise you will be on a branch named after the revision number of tag):
这篇关于使用Git下载特定标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋! $ git clone
code>
$ git tag -l </ code>列出标签,然后签出特定的标签:
$ git checkout tags /< tag_name>
$ b
$ git checkout tags /< tag_name> -b< branch_name>
Tagged release 1.1.5
" according the site.git clone http://git.abc.net/git/abc.git my_abc
$ git clone
$ git tag -l
and then checkout a specific tag:$ git checkout tags/<tag_name>
$ git checkout tags/<tag_name> -b <branch_name>