title: Git: Push shallow clone to a new remote without 'unshallow'?
body: <p>I made a shallow clone of a repository with <code>git clone --depth=1</code>.  I made some changes... apparently without understanding the complications of shallow clones... and now want to push the new project to a new remote.</p>
  
  <p>On my main dev machine:</p>
  
  <pre><code>git clone --depth=1 file://old_project new_project
  cd new_project
  # made a handful of commits here....
  </code></pre>
  
  <p>I now want to push the project to another machine.  On that remote machine I did:</p>
  
  <pre><code>git init --bare new_project.git
  </code></pre>
  
  <p>And then back on my machine:</p>
  
  <pre><code>git remote remove origin
  git remote add origin ssh://&lt;remote host&gt;/path/to/repos/new_project.git
  </code></pre>
  
  <p>Now when I try to <code>push</code> the project, I get:</p>
  
  <pre><code>fatal: protocol error: expected old/new/ref, got 'shallow 7f6a256...'
  fatal: The remote end hung up unexpectedly
  Counting objects: 49299, done.
  Delta compression using up to 8 threads.
  Compressing objects: 100% (44533/44533), done.
  error: pack-objects died of signal 13
  error: failed to push some refs to '&lt;my new remote&gt;'
  </code></pre>
  
  <p>What I'd like to do is have the new repo contain the history from the initial shallow clone onward, but still retain the changes made after that point.  In other words, I don't want to "unshallow" the branch and pull all the previous history.</p>
  
  <p>Is there a way forward without with just deleting <code>.git</code> directory from the project and starting over?</p>
  
  <p>My machine is running git 1.9.1.  The remote is running 1.7.11.7.  I can probably update my side with no ill effects, but not the remote as it hosts several other projects that I don't want to risk disrupting.</p>