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.