title: Unexpected result of git rebase master in local branch
body: <p>I had a local branch which was branched off master quite some time ago, on which there were several commits. I wanted to get this local branch up to date with master so I did</p>
  
  <pre><code>git co my_branch
  git rebase master
  </code></pre>
  
  <p>expecting this to replay the commits in my_branch on top of master. However, it seems to have instead merged the commits in my_branch into master and then brought my_branch forward to the same place as master, i.e. I've gone from this:</p>
  
  <pre><code>A -- B -- C -- D master, origin/master
        \
         E -- F my_branch
  </code></pre>
  
  <p>to this:</p>
  
  <pre><code>A -- B -- E -- F -- C -- D master, origin/master, my_branch
  </code></pre>
  
  <p>when I was expecting this:</p>
  
  <pre><code>A -- B -- C -- D master
                  \
                   E' -- F' my_branch
  </code></pre>
  
  <p>My question is not so much why it did this, but whether I can put things back to where they were originally, since presumably the inserted commits will be problematic when interacting with the remote repository (to which subsequent commits have been pushed).</p>
  
  <p><strong>Edit</strong></p>
  
  <p>It turns out that I had already merged in the branch. So, the rebase had nothing to do and just left the my_branch pointer in same place as master.</p>