title: git subtree merge ignoring --prefix
body: <p>I'm having a weird error with git 1.8.3 on Windows. Using <code>git subtree</code>, I took a file to be shared between two projects and pushed it to another repository.</p>
  
  <p>So, in repo1 I did this:</p>
  
  <pre><code># push script
  git subtree split --prefix=shared-dir --rejoin --branch split
  git push shared-repo split:master
  git branch -D split
  </code></pre>
  
  <p>In both repos, <code>shared-repo</code> refers to the remote containing the shared code. The shared code would reside in a directory with the same name.</p>
  
  <p>In repo2 I did this:</p>
  
  <pre><code># pull script
  git fetch shared-repo
  git subtree merge --prefix=shared-dir shared-repo/master
  </code></pre>
  
  <p>What I expect it to do is to fetch the shared file and put it in repo2 under the directory <code>./shared-dir/</code>. What happens is that the file is put in the root of the repository!</p>
  
  <p>Moving the file to the correct folder, committing and executing something similar to the push script of repo1 results in a rejection in the push because it says that the push is not fast-forward. Running the pull script again says that everything is up-to-date.</p>
  
  <p>I'm stomped and searching the internet didn't reveal anyone else having a similar problem. What's wrong and what can I do?</p>
  
  <hr>
  
  <p>Update: the same happens with git 1.7.9.5 on Ubuntu 12.04 with the <code>git-subtree</code> script taken from the git repository some two weeks ago. I also changed the command to say <code>--prefix=./shared-dir/</code> to no avail.</p>
  
  <p>Interestingly, <code>git subtree</code> makes the <code>shared-dir</code> directory, but puts the shared file in the root directory instead of inside that directory.</p>