rubenv / grunt-git

Git commands for grunt.
MIT License
227 stars 83 forks source link

gitcheckout a specific folder from a branch? #137

Open jessequinn opened 6 years ago

jessequinn commented 6 years ago

how can I do something like

git checkout master git checkout source -- _site

gitcheckout: {
   master_gitcheckout: {
      options: {
         branch: "master"
      }
   },
   source_gitcheckout: {
      options: {
         branch: "source -- _site"
      }
   }
}

fails with pathspec 'source -- _site' did not match any file(s) known to git.

jessequinn commented 6 years ago

I have also tried

        gitcheckout: {
            master_gitcheckout: {
                options: {
                    branch: "master"
                }
            },
            source_gitcheckout: {
                options: {
                    branch: "source"
                },
                files: {
                    src: ['_site/*']
                }
            }

        }
    });