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

Re: How to recovery a corrupted git repo

From
Ping Yin <pkufranky@gmail.com>
Date
Feb 21, 2011, 15:03 UTC
Message-ID
<AANLkTim-O+LR_r=N6y7Dcip8xQGcBVP2FiVhu22Zhysf@mail.gmail.com>
In-Reply-To
<vpqpqql1lw6.fsf@bauges.imag.fr>

On Mon, Feb 21, 2011 at 10:51 PM, Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> wrote:

Show 11 quoted lines
> Axel Freyn <axel-freyn@gmx.de> writes:
>
> There's also the brute-force approach
>
> rsync $good_repo/.git/objects/ $bad_repo/.git/objects/
> cd $bad_repo
> git gc
>
> Notice the absence of --delete in the rsync command: I'm just adding
> new files in the $bad_repo, not deleting any (since files with
> identical names must have identical content).

Thanks. This should be an applicable method. However, before rsyncing, the pack should be unpacked first.

Previous: Matthieu MoyNext: Matthieu Moy
Message 6 of 8 in “How to recovery a corrupted git repo”
  1. Ping YinFeb 21, 2011
  2. Christian CouderFeb 21, 2011
  3. Axel FreynFeb 21, 2011
  4. Ping YinFeb 21, 2011
  5. Matthieu MoyFeb 21, 2011
  6. Ping YinFeb 21, 2011
  7. Matthieu MoyFeb 21, 2011
  8. Ping YinFeb 22, 2011

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.