Indhu Bharathi
Indhu Bharathi

Reputation: 1478

How to recursively clone a particular tag in git

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

Upvotes: 7

Views: 4836

Answers (1)

Indhu Bharathi
Indhu Bharathi

Reputation: 1478

Recursive clone a tag in one line:

git clone --recursive --branch <tag-name> https://github.com/user/repo.git

Upvotes: 12

Related Questions