git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andreas Ericsson <ae@op5.se>
To: Misha Koshelev <mk144210@bcm.edu>
Cc: git@vger.kernel.org
Subject: Re: Recover broken git index?
Date: Thu, 28 May 2009 11:01:49 +0200	[thread overview]
Message-ID: <4A1E52FD.6090801@op5.se> (raw)
In-Reply-To: <4A1DB700.4080705@bcm.edu>

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@op5.se
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.

  reply	other threads:[~2009-05-28  9:02 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-27 21:56 Recover broken git index? Misha Koshelev
2009-05-28  9:01 ` Andreas Ericsson [this message]
2009-05-28 12:43   ` Misha Koshelev
2009-05-28 18:09     ` Linus Torvalds
2009-05-28 21:02       ` Misha Koshelev
2009-05-28 21:20         ` Linus Torvalds

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4A1E52FD.6090801@op5.se \
    --to=ae@op5.se \
    --cc=git@vger.kernel.org \
    --cc=mk144210@bcm.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).