Re: Recover broken git index?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Misha Koshelev wrote:
Hi, I seem to have an unrecoverable git index. I have attached the
output of git-fsck --full. There seem to be a lot of missing trees and
blobs. Any good way to recover?


Start by copying the repository somewhere safe so you don't accidentally
delete things in it.

If it's really the index that's broken, a simple

 git checkout master && git reset --hard

should do the trick.

If it doesn't, it's not the index that's at fault.


Have you done history surgery on this repository (extensive rebasing
or filter-branch'ing)?


Answers to the questions below really should have been in your original
post. Please include them if we're to be able to understand what's going
on:
What OS and platform are you using?
What git version are you using?
How did you first notice this?
What were you doing when you first noticed this?
Is your repository working correctly otherwise (ie, do you only spot
these errors when you run "git fsck --full")?

--
Andreas Ericsson                   andreas.ericsson@xxxxxx
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231

Register now for Nordic Meet on Nagios, June 3-4 in Stockholm
http://nordicmeetonnagios.op5.org/

Considering the successes of the wars on alcohol, poverty, drugs and
terror, I think we should give some serious thought to declaring war
on peace.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]