title: Using git filter-branch to remove everything except one subdirectory
body: <p>I have been trying to use git to remove everything except the source code in a particular branch. The</p>
  
  <pre><code>git filter-branch -f \
      --subdirectory-filter source_code \
      --prune-empty \
      --tag-name-filter cat -- --all
  </code></pre>
  
  <p>command gets me basically what I want, except it places the files in <code>source_code/</code> at the root, whereas I want them all to remain in the directory. I.e.</p>
  
  <pre><code>- source_code
      - file1.py
      - file2.py
  </code></pre>
  
  <p>not just</p>
  
  <pre><code>- file1.py
  - file2.py
  </code></pre>
  
  <p>How can I do this?</p>