Help with GIT recovery

0

Personally I had performed a backup of my dir /.git/ and zipei.

But I had problems in this file, I managed to unpack with errors. I would like to know if you have a command to FORCE to try to recover as much of this /.git/ files as possible

    
asked by anonymous 08.03.2016 / 01:18

1 answer

0

First, make a folder to re-create a repository:

mkdir repo
mv .git repo
cd repo

Then delete empty (corupt) files

find .git -size 0 -delete

Try a file system check:

git fsck

If you have another deposit, use it to rebuild what's missing:

git remote add origin url
git fetch origin
    
10.03.2016 / 14:11