title: How to rebase after git-subtree add?
body: <p>I'm trying to learn the new <a href="https://github.com/apenwarr/git-subtree" rel="noreferrer">git-subtree</a> command which was added in Git 1.7.11. I seem to lose ability to rebase after I add a subtree. I have the primary repository with README file and a library repository which also has a README file. I add it to lib directory with <code>subtree add</code>:</p>
  
  <pre><code>$ git subtree add -P lib/mylib myliborigin master
  </code></pre>
  
  <p>This works fine, but now the history looks like this:</p>
  
  <pre><code>*   22c1fe6 (HEAD, master) Merge commit 'b6e698d9f4985825efa06dfdd7bba8d2930cd40e' as 'lib/mylib' - 
  |\                                                                                                                
  | * b6e698d Squashed 'lib/mylib/' content from commit d7dbd3d
  * b99d55b Add readme
  * 020e372 Initial
  </code></pre>
  
  <p>Now when I want to rebase my repo against <code>origin/master</code> and it fails because the squash commit is applied directly against its parent commit which does not apply, because it is applied to the root of the repo and not the prefix I gave it to it when adding the subtree.</p>
  
  <p>The reason for this is pretty clear if I look at the squash commit. There is no information about the prefix. It is just the original mylib commits squashed together. Only the next merge commit knows anything about it, but rebase does not take it to account here.</p>
  
  <p>Are there any workarounds (besides never rebasing over the subtree commits)?</p>