title: Git2go - pull && merge
body: <p>I am trying to implement something that will give me the outcome of <code>git pull</code> or <code>git fetch &amp;&amp; git merge</code>. I got this working in part, but the problem I am having is that after running the following code, <strong>the current repo is left thinking that there are local changes to be committed.</strong> </p>
  
  <p>As far as I can see, I believe I am probably not creating the annotated commit from the correct HEAD or I need to make another commit? (I am not sure).</p>
  
  <p>My code looks like this and I am stuck:</p>
  
  <pre><code>func (repo *Repo) Pull() error {
      // Get remote
      remote, err := repo.Remotes.Lookup("origin")
      if err != nil {
          remote, err = repo.Remotes.Create("origin", repo.Path())
          if err != nil {
              return err
          }
      }
  
      // Get the branch
      branch, err := repo.Branch()
      if err != nil {
          return err
      }
  
      // Get the name
      branchName, err := branch.Name()
      if err != nil {
          return err
      }
  
      if err := remote.Fetch([]string{}, &amp;git.FetchOptions{}, ""); err != nil {
          return err
      }
  
      // Merge
      remoteRef, err := repo.References.Lookup("refs/remotes/origin/" + branchName)
      if err != nil {
          return err
      }
  
      mergeRemoteHead, err := repo.AnnotatedCommitFromRef(remoteRef)
      if err != nil {
          return err
      }
  
      mergeHeads := make([]*git.AnnotatedCommit, 1)
      mergeHeads[0] = mergeRemoteHead
      if err = repo.Merge(mergeHeads, nil, nil); err != nil {
          return err
      }
  
      return nil
  }
  </code></pre>
  
  <p>After running it, I get the changes from remote merged and the working directory updated, but it tells me I need to make a commit.</p>
  
  <p>I think I have a similar issue as the OP of <a href="https://stackoverflow.com/questions/29629911/doing-git-fetch-git-merge-from-remote-with-git2go">this question</a>.</p>