From: Joshua Jensen <jjensen@workspacewhiz.com>
To: "git@vger.kernel.org" <git@vger.kernel.org>
Subject: Replacing a corrupt blob
Date: Tue, 09 Nov 2010 10:02:08 -0700 [thread overview]
Message-ID: <4CD97E90.5010906@workspacewhiz.com> (raw)
I just helped someone fix a repository where a blob became corrupted a
while back when passing through Dropbox. No backup of the original blob
existed.
The user told me the contents of the blob was unimportant.
Thinking I could be clever, I ran 'git replace' to replace the blob with
something else. I thought I could run 'git clone' or 'git
filter-branch' to apply it permanently, but that didn't seem to work.
In the end, I ran 'git fast-export', changed the blob SHA, and then ran
'git fast-import'. 'git fsck' still told me the blob was corrupt, and I
couldn't determine the sequence of commands to make it clear out the bad
blob (expire the reflog, prune, etc).
I was able to 'git clone' to another location, and the bad blob was gone.
Is there another way to permanently replace a corrupt blob?
What is the right way to remove the corrupt blob without running 'git
clone'?
Thanks!
Josh
reply other threads:[~2010-11-09 17:02 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=4CD97E90.5010906@workspacewhiz.com \
--to=jjensen@workspacewhiz.com \
--cc=git@vger.kernel.org \
/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).