title: How do I pull all branches with NodeGit?
body: <p>I´m trying to do an update of my local repository.</p>
  
  <p>According to the documentation, doing a fetchAll fetches all branches from the remote, which is what I´m currently doing. There is nothing like <strong>pullAll</strong> which automatically merges those remotes with my local ones.</p>
  
  <p>My idea now was to get all branches after doing a fetchAll</p>
  
  <pre><code> gitUpdate(url, options, repositoryPath, callback) {
          let repository = undefined;
          NodeGit.Repository.open(repositoryPath)
              .then(function (repo) {
                  repository = repo;
                  return repo.fetchAll(options.fetchOpts);
              })
              .then(function () {
                  return repository.getReferenceNames(NodeGit.Reference.TYPE.LISTALL);
              })
              .then(function (branches) {
                  /*
                   [ 'refs/heads/test',
                     'refs/heads/master',
                     'refs/remotes/origin/master',
                     'refs/remotes/origin/test' ] 
                  */
                  return console.log("branches", branches);
              })
              .then(function (fetched) {
                  callback(null, fetched);
              }, function (err) {
                  callback(err);
              });
      };
  </code></pre>
  
  <p>then iterate over them, filtering out matching ones and doing some string stuff to fit them into <strong>repository.mergeBranches("master", "origin/master");</strong></p>
  
  <p>While doing that I´m just thinking this can´t be seriously the way to go and there must be a shortcut somehow.</p>
  
  <p><strong>How do I simply sync the local repository with the remote one, including all branches, without cloning the repository again?</strong></p>