git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: recovering a corrupted git repo

From
Christian Couder <christian.couder@gmail.com>
Date
Jan 7, 2013, 09:33 UTC
Message-ID
<CAP8UFD2zRsJgUf9+EoCDURL4ywQFyPLTkQEGK1Af73m7e=ct5w@mail.gmail.com>
In-Reply-To
<50EA44BA.2030107@ubuntu.com>
On Mon, Jan 7, 2013 at 4:44 AM, Phillip Susi <psusi@ubuntu.com> wrote:
Show 14 quoted lines
>
> I have not had any issue until I ran a git fsck recently, which
> repored gzip and crc errors in some pack files.  git fsck does not
> seem to repair the errors, only report them.  I would like to try to
> rebuild my repository, without downloading any more from the origin
> than I have to.  All of the commits I have added seem to still be
> intact, so I assume the corruption in somewhere in the upstream
> history packs.
>
> How can I correct the errors, and fetch the corrupted upstream
> history, while preserving my patches?  So far I have exported my
> patches as bundles, and made a fresh clone from upstream, then pulled
> the bundles back in, but there must be a better way that only fetches
> the corrupted bits from upstream?
The documentation about fixing broken repo is this one:
https://git.wiki.kernel.org/index.php/GitFaq#fix-broken-repo

Hope this helps, Christian.

Previous: Phillip Susi
Message 2 of 2 in “recovering a corrupted git repo”
  1. Phillip SusiJan 7, 2013
  2. Christian CouderJan 7, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.