Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/node.js/35.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/git/22.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Node.js 使用Node下载git repo的特定标记的代码_Node.js_Git_Github_Git Clone_Nodegit - Fatal编程技术网

Node.js 使用Node下载git repo的特定标记的代码

Node.js 使用Node下载git repo的特定标记的代码,node.js,git,github,git-clone,nodegit,Node.js,Git,Github,Git Clone,Nodegit,我想下载github上托管的私有git repo的源代码,只针对特定的标记。据我所知,有一个选项可以使用git clone--depth=1。我想这就是如何使用标签的答案 现在,我想在Node.js脚本中执行此操作。我检查了使用的包裹。问题是libgit2 因此,我坚持使用子进程的最后一个选项,这是我不想做的,因为它看起来像是一种变通方法。有没有其他方法可以做到这一点

我想下载github上托管的私有git repo的源代码,只针对特定的标记。据我所知,有一个选项可以使用
git clone--depth=1
。我想这就是如何使用标签的答案

现在,我想在Node.js脚本中执行此操作。我检查了使用的包裹。问题是libgit2

因此,我坚持使用
子进程的最后一个选项,这是我不想做的,因为它看起来像是一种变通方法。有没有其他方法可以做到这一点