Git - Broken Links, Missing & Dangling Trees

Try cloning the remote repository into a new folder.
Does it also have these errors? If not, simply use this clone and delete the corrupted one.

Any modified files that have not yet been committed can simple be copied to the new folder. Important: Don't copy the .git folder.


For me, a simple git gc did the job... This gave me a couple of rm: cannot unlink ... Permission denied messages. But in the end, it seemed to have worked for my case.

But probably depends on how exactly the repo is corrupted.

Tags:

Git

Smartgit