{"thread":{"id":"32547","subject":"recovering a corrupted git repo","startedAt":"2013-01-07T03:44:58Z","lastAt":"2013-01-07T09:33:00Z","messageCount":2,"participants":["Phillip Susi","Christian Couder"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"206206","messageId":"50EA44BA.2030107@ubuntu.com","threadId":"32547","inReplyTo":null,"subject":"recovering a corrupted git repo","fromName":"Phillip Susi","fromEmail":"psusi@ubuntu.com","sentAt":"2013-01-07T03:44:58Z","receivedAt":"2013-01-07T03:44:58Z","isPatch":false,"sender":{"key":"psusi@ubuntu.com","avatar":null},"body":"-----BEGIN PGP SIGNED MESSAGE-----\nHash: SHA1\n\nI have not had any issue until I ran a git fsck recently, which\nrepored gzip and crc errors in some pack files.  git fsck does not\nseem to repair the errors, only report them.  I would like to try to\nrebuild my repository, without downloading any more from the origin\nthan I have to.  All of the commits I have added seem to still be\nintact, so I assume the corruption in somewhere in the upstream\nhistory packs.\n\nHow can I correct the errors, and fetch the corrupted upstream\nhistory, while preserving my patches?  So far I have exported my\npatches as bundles, and made a fresh clone from upstream, then pulled\nthe bundles back in, but there must be a better way that only fetches\nthe corrupted bits from upstream?\n\n-----BEGIN PGP SIGNATURE-----\nVersion: GnuPG v1.4.11 (GNU/Linux)\nComment: Using GnuPG with undefined - http://www.enigmail.net/\n\niQEcBAEBAgAGBQJQ6kS6AAoJEJrBOlT6nu75tFgIAJCI+DEWDVxddEQM5qhmz1y8\n3JuqjTHp7gIXmQv6WGbEIehJrRfTBudQn+Ip2jLMwavvL16oZe+cf/uuLo393Z+T\npxEcWHOtjdU/XZeQOV//R/Cfo7PY5n8wfasgFYZuFesJchInwFocTI6S5x2B9kIB\ndvLonoiDQwe9JqQaoAxM0OLTWe9aj0gc3c36+WUlRgRZijUhEogYQwU8aEoa+TMq\ns2p+tbaNYKocRAafQ4824DMnuQTWb+HJVU4uI1pH2yB964Urq9ELSX2jxeSRdlaH\nd+AoJ8oMdymmUwPeuyivcmQQHEGGsxxgCOuLSSHh1hcxMaytZNcEkVQ6OzuGyZk=\n=yUr4\n-----END PGP SIGNATURE-----\n"},{"id":"206220","messageId":"CAP8UFD2zRsJgUf9+EoCDURL4ywQFyPLTkQEGK1Af73m7e=ct5w@mail.gmail.com","threadId":"32547","inReplyTo":"50EA44BA.2030107@ubuntu.com","subject":"Re: recovering a corrupted git repo","fromName":"Christian Couder","fromEmail":"christian.couder@gmail.com","sentAt":"2013-01-07T09:33:00Z","receivedAt":"2013-01-07T09:33:00Z","isPatch":false,"sender":{"key":"christian.couder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/208954?v=4"},"body":"On Mon, Jan 7, 2013 at 4:44 AM, Phillip Susi <psusi@ubuntu.com> wrote:\n>\n> I have not had any issue until I ran a git fsck recently, which\n> repored gzip and crc errors in some pack files.  git fsck does not\n> seem to repair the errors, only report them.  I would like to try to\n> rebuild my repository, without downloading any more from the origin\n> than I have to.  All of the commits I have added seem to still be\n> intact, so I assume the corruption in somewhere in the upstream\n> history packs.\n>\n> How can I correct the errors, and fetch the corrupted upstream\n> history, while preserving my patches?  So far I have exported my\n> patches as bundles, and made a fresh clone from upstream, then pulled\n> the bundles back in, but there must be a better way that only fetches\n> the corrupted bits from upstream?\n\nThe documentation about fixing broken repo is this one:\n\nhttps://git.wiki.kernel.org/index.php/GitFaq#fix-broken-repo\n\nHope this helps,\nChristian.\n"}]}