title: git rebase --onto results on single commit
body: <p>I want to create a branch out of master but I need this branch to have an empty tree. After a bit of researching I've come up with the following situation:</p>
  
  <ul>
  <li>Master branch have a single commit with a dummy file. </li>
  <li>I checkout a new branch </li>
  <li>I remove all files and commit</li>
  <li>I create a new commit with --allow-empty</li>
  </ul>
  
  <p>The following commands should get you up to that:</p>
  
  <pre><code>$ git init  
  $ touch dummy  
  $ git add .  
  $ git commit -m 'initial commit'  
  $ git checkout -b new-branch  
  $ git rm -rf .  
  $ git commit -m 'clean up tree'  
  $ git commit --allow-empty -m 'new branch initial commit'
  </code></pre>
  
  <p>Now I want to get rid of 'clean up tree' commit. I'm trying to use rebase --onto like</p>
  
  <pre><code>$ git rebase --onto HEAD~2 HEAD^  
  </code></pre>
  
  <p>But I end up with a single commit ('initial commit') and all refs on it (HEAD, master, new-branch). And if I checkout into new-branch, dummy file is back.</p>
  
  <p>Where did my 'new branch initial commit' went? What I'm a missing?</p>
  
  <p>Obs.: I'm doing this because I want to relate those branches but I don't want to keep the files from the parent commit.</p>