如何在git中递归克隆特定标签

Ind*_*thi 2 git github

如何在git中进行特定标签的递归克隆?我知道下面的命令列表会做到这一点。但是有更短的方法吗?

$ git clone https://github.com/user/repo.git
$ cd repo
$ git checkout tags/<tag-name> 
$ git submodule update --init --recursive
Run Code Online (Sandbox Code Playgroud)

Ind*_*thi 6

递归地在一行中克隆标签:

git clone --recursive --branch <tag-name> https://github.com/user/repo.git
Run Code Online (Sandbox Code Playgroud)