title: Re-use git trees on push
body: <p><strong>Preamble:</strong></p>
  
  <p>I am experimenting with using the deduplication feature of git for binary deployments.</p>
  
  <p>Yes, i know most sources say this is a <em>bad idea (tm)</em>, but in my tests so far this actually works great.</p>
  
  <p>I would like to have one branch for each version, with each branch being an orphan, that is, containing a single commit without any parents.</p>
  
  <p>On the client side, with fetch, this works great.</p>
  
  <p>I do a <code>git init</code> and <code>git remote add origin [url]</code> and then only fetch the specific version with <code>git fetch origin [version]</code>.</p>
  
  <p>On the first fetch, it fetches everything, on subsequent updates, it can reuse a large chunk of the objects.</p>
  
  <hr>
  
  <p><strong>Issue: Observed behavior on push:</strong></p>
  
  <p>When I do a push, it always pushes everything, ignoring any unchanged files.
  Even if I push the exact same tree twice with different commits, it will push everything each time.</p>
  
  <p>As I understand this, it is because the pushed commit doesn't have any parents.</p>
  
  <p>If there is a parent-child relation, it will reuse objects on push instead.</p>
  
  <p><strong>Question:</strong></p>
  
  <p>Is there a way to tell git to reuse objects on push, even if the commit that I am pushing is an orphan?</p>
  
  <p>I guess a workaround could be to have a linear history of commits, then do a <code>git fetch --depth 1</code> on the client.</p>