Git clone tag-Download a specific tag with Git

923    Asked by KaylaShinn in Devops , Asked on Jul 19, 2021

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 the object name of something long hex number.

But the version name is "Tagged release 1.1.5" according to the site.

I tried a command like this (with names changed):

git clone http//git.abc.net/git/abc.git my_abc

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? How to download git clone tag?

Answered by James Wilson

: For downloading a specific git clone tag follow these commands

 git clone

It will help you to have the whole repository. After this, you can list the tags using

git tag -l

create a new branch that will be helpful and checkout the tags using

 git checkout tags/ -b

You can also check out tag using

git checkout tags/

But you will be on a branch named after the revision number of the tag.



Your Answer

Interviews

Parent Categories