title: Fetching only head of a single branch and pushing to an empty repo on Git
body: <p>I have a repo with my codebase, and each project inherits this codebase.
  It has it's submodules on it and everything works fine.</p>
  
  <p>When I start a new project from scratch, how is supposed to be cloning this repo (only the master branch) and only the HEAD (since I don't want each project have a lot of commits of the base).</p>
  
  <p>I tried:</p>
  
  <pre><code>    git init
      git remote add -t origin URLtoProjectRepo
      git remote add -t codebase URLtoMainCodeBase
      git pull codebase master --depth=1
  </code></pre>
  
  <p>When I try to push this to the project repo I get:</p>
  
  <pre><code>    [remote rejected] master -&gt; master (missing necessary objects)
      error: failed to push some refs to 'ProjectURL'
  </code></pre>
  
  <p>What I'm missing?</p>