title: Git corrupted repo: how to pick a git object from a clean repository
body: <p>This is one of the numerous questions regarding a Git repo that is corrupted, precisely a loose object that went wrong:</p>
  
  <pre><code>$ git gc
  Counting objects: 3299, done.
  error: inflate: data stream error (unknown compression method)
  error: unable to unpack 831a5d31af4a0af2f5a367689bee27a44efc22c9 header
  Delta compression using up to 6 threads.
  Compressing objects: 100% (3283/3283), done.
  error: inflate: data stream error (unknown compression method)
  fatal: loose object 831a5d31af4a0af2f5a367689bee27a44efc22c9 (stored in .git/objects/83/1a5d31af4a0af2f5a367689bee27a44efc22c9) is corrupt
  error: failed to run repack
  </code></pre>
  
  <p>Following existing answers on the subject (<a href="https://stackoverflow.com/q/4111728">How do I deal with corrupted git object files?</a>,  <a href="https://stackoverflow.com/q/18678853">How to fix corrupted git repository?</a>, or <a href="https://stackoverflow.com/q/4929674">What can I do with Git corruption due to a missing object?</a>) I already removed the object <code>831a5d31</code> from the corrupted repository.</p>
  
  <p>In my case I have a clone of the repository, that seems to hold the object I'm missing, but there's no file at <code>objects/83/1a5d31af4a0af2f5a367689bee27a44efc22c9</code>. How can I do to fix my repository?</p>