• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

libgit2 error after laptop crash - any way to recover?

LEGEND ,
Feb 06, 2018 Feb 06, 2018

Copy link to clipboard

Copied

My laptop crashed (blue screen of death!) and after restarting I got the infamous "libgit2 error" on the project.  I have a backup from a day ago, but I put a fair bit of effort into it since then, so thought I would see if any way to repair it before losing that work.

Another thread mentioned creating the "objects" directory, but its already there.

Anything else I can try before restoring from backup?

Is the "repo.noindex" directory a git repository (like the .git directory using by git command lines). Does that mean I can use command line git tools to try and repair the directory?

Views

563

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Feb 06, 2018 Feb 06, 2018

Everything I read sounded dire, so I restored from backup. After I restored from backup, "git --git-dir=repo.noindex fsck" still reported it as corrupt, so maybe its not a standard git repo somehow or other. Maybe standard git does not use SQL Lite for the repo files...

Votes

Translate

Translate
LEGEND ,
Feb 06, 2018 Feb 06, 2018

Copy link to clipboard

Copied

Well, interesting.... so it is a git repo.... I am going to do a bit of Google hunting on git repos to see if there is a way to recover it.  Looks like it lost the "refs/heads/master" file when it crashed. (Most people say throw away your .git directory and start again...)

$ git --git-dir=repo.noindex fsck --full
error: Invalid HEAD
Checking object directories: 100% (256/256), done.
error: refs/heads/master: invalid sha1 pointer 0000000000000000000000000000000000000000
error: refs/heads/v107_1.1.1: invalid sha1 pointer 0000000000000000000000000000000000000000
notice: No default references

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 06, 2018 Feb 06, 2018

Copy link to clipboard

Copied

LATEST

Everything I read sounded dire, so I restored from backup. After I restored from backup, "git --git-dir=repo.noindex fsck" still reported it as corrupt, so maybe its not a standard git repo somehow or other. Maybe standard git does not use SQL Lite for the repo files...

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines