git - Gulp-git clone 在特定的文件夹位置。克隆到 'undefined' 文件夹

标签 git gulp

如何克隆并放置到特定位置?

 var git = require('gulp-git'); 
// Clone a remote repo
 gulp.task('clone', function(){
 git.clone('https://git-location', './apps/');
});

我一直在查看文档,但找不到。

下面是运行任务后的输出

[11:17:05] Starting 'clone'...
[11:17:05] Finished 'clone' after 5.76 ms
[11:17:48]  Cloning into 'undefined'...

当我运行任务时,它会将文件复制到 undefined 文件夹中。显然,我做错了什么。谁能给我指出来吗?

最佳答案

感谢 S.Lacey(gulp-git 的发布者之一)对我的问题的及时回复。以下是正确的格式。

git.clone("https://git-location",{cwd: "./apps/"});

关于git - Gulp-git clone 在特定的文件夹位置。克隆到 'undefined' 文件夹,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24515066/

相关文章:

windows - 由于文件名中的字符无效,在 Windows 上克隆存储库时出错

git - 为什么推送后删除的分支没有在远程删除?

javascript - JS 正则表达式替换文件名中的版本号

javascript - 我怎样才能让 gulp 对某些任务(单元测试、 vert 等)保持沉默?

node.js - Gulp 在启动时运行一次监视任务

node.js - npm start 不适用于 Gulp js 上的 React 应用程序

laravel - 防止 git 在 git pull 时覆盖文件所有者

git - 使用 Github CLI 克隆存储库是使用 HTTPS 还是 SSH?

java - 如何运行所有修改过的 JUnit 测试类?

javascript - 部署缩小的 JavaScript 文件并进行调试