title: How to diagnose and fix git fatal: unable to read tree
body: <p>I'm using <code>git</code> to manage files on a project, and keep running into this problem.</p>
  
  <p>When I run <code>git status</code> I get the message</p>
  
  <pre><code>fatal: unable to read tree e2d920161d41631066945a3cbcd1b043de919570
  </code></pre>
  
  <p>As I understand it, I should check the output of <code>git fsck</code>, and I receive</p>
  
  <pre><code>broken link from    tree e09a42f248afff64336fbbec2523df97c26451ac
                to    tree e2d920161d41631066945a3cbcd1b043de919570
  broken link from    tree e09a42f248afff64336fbbec2523df97c26451ac
                to    tree 9b0dd389bd7f9e8d257395d57e0881b7957f9698
  broken link from    tree e09a42f248afff64336fbbec2523df97c26451ac
                to    tree 9e288a4ad60d63f342dfd18237980674426aa725
  broken link from    tree e09a42f248afff64336fbbec2523df97c26451ac
                to    tree 2a04647337089f554fab8c49cfd37149e5f4fc9f
  broken link from    tree e09a42f248afff64336fbbec2523df97c26451ac
                to    tree ea16658b45ce961adc3c3f519b0e8d9672918ca8
  </code></pre>
  
  <p>together with a lot of <code>missing blob</code> messages.</p>
  
  <p>Following various resources (e.g <a href="https://stackoverflow.com/questions/16955523/git-broken-links-missing-dangling-trees">Git - Broken Links, Missing &amp; Dangling Trees</a>) I have simply re-cloned the project from <code>github</code> and started again. </p>
  
  <p>Once I have re-cloned the project, all is good for a few <code>commit</code>s, and then the problem arises again. Re-cloning every time doesn't seem to be optimal, and seems to go against the idea of using <code>git</code>, and I'd like to try and understand what is going on. How can I diagnose and fix this problem?</p>