Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to recursively clone a particular tag in git

Tags:

git

github

How to do a recursive clone of a particular tag in git? I know the following list of commands will do it. But is there a shorter way?

$ git clone https://github.com/user/repo.git
$ cd repo
$ git checkout tags/<tag-name> 
$ git submodule update --init --recursive
like image 750
Indhu Bharathi Avatar asked Dec 23 '22 16:12

Indhu Bharathi


1 Answers

Recursive clone a tag in one line:

git clone --recursive --branch <tag-name> https://github.com/user/repo.git
like image 132
Indhu Bharathi Avatar answered Dec 26 '22 10:12

Indhu Bharathi