Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to fix a bad git tree object

Tags:

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:

error: Could not read 9eefe9305253b2c039a54cbc8aa22f7f8e6e8790 fatal: bad tree object 9eefe9305253b2c039a54cbc8aa22f7f8e6e8790 

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.

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?

like image 328
Flupkear Avatar asked Jan 25 '12 15:01

Flupkear


1 Answers

Just Quit the applcation with which you accessing git and restart . Worked for me for xcode-iOS.

like image 116
Ankish Jain Avatar answered Nov 16 '22 19:11

Ankish Jain