title: How to fix a bad git tree object
body: <p>I have a local copy of a repository that not longer have any remote associated to it.
  I'm trying to push this repo into a new remote however everytime I get this message: </p>
  
  <pre><code>error: Could not read 9eefe9305253b2c039a54cbc8aa22f7f8e6e8790
  fatal: bad tree object 9eefe9305253b2c039a54cbc8aa22f7f8e6e8790
  </code></pre>
  
  <p>I read in similar questions here that one way to fix it is retrieving this object from other copies of the repository or doing a hard reset. I can't do any of both since I don't have another copy of this repo.</p>
  
  <p>Is there a way to simply remove this commit or some other kind of solution that will allow me to push the repo to the new remote keeping history?</p>