Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Browse list of tagged releases in a repo?

Tags:

git

I'm trying to checkout OpenSSL 1.0.2a (and not Master). OpenSSL has tagged releases, and I'm trying to browse them to determine what the actual name is. I know they have 1.0.0, 1.0.1 and 1.0.2 (but they are named more complexly).

According to OpenSSL Git repository, the repo is located at git://git.openssl.org/openssl.git.

According to How to see all tags in a git repository in command line, I need to use git tag:

$ git tag git://git.openssl.org/openssl.git
fatal: Not a git repository (or any of the parent directories): .git

How do I browse the tagged releases held in a Git repo?


For completeness, Git for beginners: The definitive practical guide does not discuss this topic.

like image 307
jww Avatar asked Apr 26 '15 19:04

jww


People also ask

How do I find the list of tags?

In order to list Git tags, you have to use the “git tag” command with no arguments. You can also execute “git tag” with the “-n” option in order to have an extensive description of your tag list.

How do I fetch all tags?

To fetch tags from your remote repository, use “git fetch” with the “–all” and the “–tags” options. Let's say for example that you have a tag named “v1. 0” that you want to check out in a branch named “release”. Using this command, you have successfully checked out the “v1.


1 Answers

git tag assumes you have a clone of the repo checked out locally. (Which is why it complains about not being in a git repository.)

To achieve what you desire, you probably want to first clone it, then switch to the desired tag:

git clone git://git.openssl.org/openssl.git
cd openssl
git tag -l                   # to list the tags
git checkout tags/<name>     # to switch to the desired tag

You can also get a list of the tags in the remote repository without doing a git clone first, by using the following command:

git ls-remote --tags git://git.openssl.org/openssl.git
like image 60
Sebastian Paaske Tørholm Avatar answered Oct 22 '22 03:10

Sebastian Paaske Tørholm