Re: Recover broken git repository?
- From
- Stefan-W. Hahn <stefan.hahn@s-hahn.de>
- Date
- Jul 14, 2009, 17:52 UTC
- Message-ID
- <20090714175245.GD9919@scotty.home>
- In-Reply-To
- <alpine.LFD.2.01.0907141019380.13838@localhost.localdomain>
Also sprach Linus Torvalds am Tue, 14 Jul 2009 at 10:33:58 -0700:
Hi,
> > $ git commit -m "Some message" > > error: invalid object 1086b1c606a04bcb78b92d1d411a299d20d18034 > > fatal: Error building trees
I've trapped in a similar problem few days ago on windows using cygwin.
A simple "git status" told me an invalid object. Just doing git status corrupted the index file and only this. The reason was a wrong configured (unseen reconfigured from another script) mount via cygwin using "textmode" not "binary mode".
After remounting with "binary mode" a simple "git read-tree HEAD" repaired it. Just the index file had been corrupted.
Stefan
-- Stefan-W. Hahn It is easy to make things. / mailto:stefan.hahn@s-hahn.de / It is hard to make things simple. Please note that according to the German law on data retention, information on every electronic information exchange with me is retained for a period of six months. Bundesgesetzblatt: http://www.bgblportal.de/BGBL/bgbl1f/bgbl107s3198.pdf