来自git help archive
:
--remote=<repo>
Instead of making a tar archive from the local repository, retrieve a tar archive from a remote repository.
命令最终应该像:
$ git archive --remote=https://kave@dndigital.git.cloudforge.com/myoproject.git master
但是,如果您只是提取 repo,您可以使用以下--depth
参数进行浅克隆git clone
:
--depth <depth>
Create a shallow clone with a history truncated to the specified number of revisions. A shallow repository has a number of limitations (you cannot clone or fetch from it, nor push from nor into it), but is adequate if you are only interested in the recent history of a large project with a long history, and would want to send in fixes as patches.
所以你有这样的事情:
$ git clone --depth=1 https://kave@dndigital.git.cloudforge.com/myoproject.git