title: git rebase -i with squash cannot detach HEAD
body: <p>Using the latest git (<code>2.1.0.24</code>), whenever I try to <code>git rebase -i</code> to <code>squash</code> some commits, the squash cannot <code>detach HEAD</code> state. I expect it to squash the commits and put me back on my branch as I expected. There are no unstaged files, changes in my working tree, or anything in the stash. Why is it doing this?</p>
  
  <pre><code>&gt; [master] » git rebase -i HEAD~3
  </code></pre>
  
  <p>(I squash a few commits)...</p>
  
  <pre><code>pick c9e9b62 Fixes super important bug #123. 
  squash c0dc9f9 wip 
  pick 5385a37 wip2
  
  # Rebase fb83e59..5385a37 onto fb83e59 
  </code></pre>
  
  <p>(Then it gives me)</p>
  
  <pre><code>Note: checking out 'c9e9b62'.
  
  You are in 'detached HEAD' state. You can look around, make experimental
  changes and commit them, and you can discard any commits you make in this
  state without impacting any branches by performing another checkout.
  
  If you want to create a new branch to retain commits you create, you may
  do so (now or later) by using -b with the checkout command again. Example:
  
    git checkout -b new_branch_name
  
  HEAD is now at c9e9b62... Fixes super-important bug #123.
  could not detach HEAD
  </code></pre>
  
  <p>It appears to rebase successfully, but for some reason won't put me back on the branch.</p>
  
  <pre><code>&gt; [c9e9b62] » git rebase --continue
  No rebase in progress?
  </code></pre>
  
  <p>git graph log BEFORE the rebase attempt:</p>
  
  <pre><code>* 5385a37 (HEAD, master) wip2
  * c0dc9f9 wip
  * c9e9b62 Fixes super-important bug #123.
  * ff80ed9 random commit msg
  * 1f407d5 random commit msg
  ...
  * ef106db random commit msg
  *   6c244ef Merge branch 'sentences'
  |\
  | * a641cbf (origin/sentences) random commit msg
  | * bfe8eae random commit msg
  | ...
  </code></pre>
  
  <p>git graph log AFTER the rebase attempt:</p>
  
  <pre><code>* c9e9b62 (HEAD) Fixes super-important bug #123.
  * ff80ed9 random commit msg
  * 1f407d5 random commit msg
  ...
  * ef106db random commit msg
  *   6c244ef Merge branch 'sentences'
  |\
  | * a641cbf (origin/sentences) random commit msg
  | * bfe8eae random commit msg
  | ...
  </code></pre>