title: Git rebase a branch onto master failed, how to resolve?
body: <p>I've been working on a local copy of a remote git repo.
  I created a branch on my local copy, let's call it 'my_branch'.
  I've committed a few times on my_branch.</p>
  
  <p>I recently pushed 'my_branch' to remote. However I didn't know that someone else added a version to the remote master. So, I fetched it to my local master.</p>
  
  <p>So...long story short, my local repo looks like this (I'm trying to use the diagraming convention <a href="http://book.git-scm.com/4_rebasing.html">here</a>) .</p>
  
  <pre><code> --C0--------------C7--  (local master)
        \
         --C1-C2-C3--     (local my_branch)
               \
                --C4-C5-C6--     (local sandbox_branch)
  </code></pre>
  
  <p>I want it to look like:</p>
  
  <pre><code> --C0--------------C7--  (local master)
                        \
                         --C1'-C2'-C3'--     (local my_branch)
                               \
                                --C4'-C5'-C6'--     (local sandbox_branch)
  </code></pre>
  
  <p>I tried to rebase my_branch ONTO local master but I got this error message (I'm using a visual tool for git called GitX):</p>
  
  <pre><code>Rebase Failed!
  There was an error rebasing HEAD with branch 'master'.
  
  command: git rebase refs/heads/master
  
  It seems that I cannot create a rebase-apply directory, and
  I wonder if you are in the middle of patch application or another
  rebase.  If that is not the case, please
      rm -fr /my_project_directory/.git/rebase-apply
  and run me again.  I am stopping in case you still have something
  valuable there.
  </code></pre>
  
  <p>What am I doing wrong? How should I handle this? If I were to do this on the command line what is the command to get me to the state in the diagram above?</p>
  
  <p><strong>UPDATE 1</strong></p>
  
  <p>BTW, I'm not in the middle of an application patch or another rebase...at least not intentional.
  After I found out that remote was updated AFTER I pushed, I did a fetch. Could that have done anything to make GitX think that I'm in the middle of an application patch or another rebase?</p>
  
  <p>I've also updated the diagram to be more accurate. There is a branch off of my_branch. I didn't include it in the original question b/c I didn't think that it would matter. I'm including just in case...</p>
  
  <p><strong>UPDATE 2</strong></p>
  
  <p>FYI...The master tree for 'local' and for 'remote' looks like the diagram that I drew, except it doesn't have the sandbox_branch.</p>