Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/url/2.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
Javascript 使用最新值更新GIT的文件夹_Javascript_Node.js_Gruntjs - Fatal编程技术网

Javascript 使用最新值更新GIT的文件夹

Javascript 使用最新值更新GIT的文件夹,javascript,node.js,gruntjs,Javascript,Node.js,Gruntjs,我试图访问已经从GIT中提取的文件夹,我只是试图用添加的新值覆盖该文件夹。 但我并不是无法更新我的文件夹。有人能帮我吗。只需添加另一个目标。以下示例是简单的旧JavaScript,但我相信您可以将其更改为coffee: gitclone: { autojqm: { options: { repository: "https://github.com/imaginethepoet/autojqm" branch: "mas

我试图访问已经从GIT中提取的文件夹,我只是试图用添加的新值覆盖该文件夹。
但我并不是无法更新我的文件夹。有人能帮我吗。

只需添加另一个目标。以下示例是简单的旧JavaScript,但我相信您可以将其更改为coffee:

    gitclone: {
      autojqm: {
        options: {
          repository: "https://github.com/imaginethepoet/autojqm"
          branch: "master"
          directory: "repo"
        }
      },
      otherrepo: {
        options: {
          repository: "https://example.com/anotherrepository"
          branch: "master"
          directory: "anotherfolder"
        }
      }
    }

grunt.loadNpmTasks('grunt-git');

    grunt.task.registerTask('gitclone', function() {
        if (this.name=="gitclone"){
            grunt.log.writeln("Hurray");
            gitmerge: {
                your_target: {
                    options: {
                        repository: "https://github.com/imaginethepoet/autojqm"
                        branch :"master"
                        directory:"anotherfolder"
                    }
                }
            }
        }
        else{
            grunt.log.writeln("OOps");
        }
    });


    grunt.registerTask('default', ['gitclone']);

更改了问题,需要一些帮助。你能帮我个忙吗?那个么“用添加的新值覆盖那个文件夹”是什么意思呢?Git pull?@RemcoHaszing:例如,我使用gitclone克隆Git项目,现在如果我的Git中有任何更改,那么它应该反映到我已经克隆的文件夹中。我需要一些成功和失败时的回调函数…@remcohassing:你明白我的要求吗?不,我不明白。你现在似乎在尝试做一些不寻常的事情,而问题已经改成了它不再反映原来的问题。你不只是改变一个问题,伙计。。。
gitclone: {
  autojqm: {
    options: {
      repository: "https://github.com/imaginethepoet/autojqm"
      branch: "master"
      directory: "repo"
    }
  },
  otherrepo: {
    options: {
      repository: "https://example.com/anotherrepository"
      branch: "master"
      directory: "anotherfolder"
    }
  }
}