Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

git revision walk setup failed

Tags:

git

github

Whenever I execute git status, I get this output:

error: Could not read da1e8fd9f8afb20331f685b5c9448bd452658332 fatal: revision walk setup failed

I have no idea when this started and I can't see this commit on github.

like image 873
dagda1 Avatar asked Jul 31 '15 16:07

dagda1


2 Answers

For me it was one of git objects is damaged (likely after one system crash). To define problems in the repo start git-fsck (https://git-scm.com/docs/git-fsck) and this will show problems with objects tree in your repository.

Unfortunately I don't know easy solution to fix it. From my side the easiest way appeared to be clone the original repo to some temporary location and then completely replace (remove old, add new) .git directory in my damaged one.

BUT be careful doing this: you will lose your local un-pushed commits (but working tree would be still fine, so it would look like after git reset --mixed), index, local repository configuration, stashes. Probably you can try to replace (better totally remove and add) just .git/objects directory, in this case you can save your index and local configuration (but not un-pushed changes and stashes).

like image 64
radistao Avatar answered Nov 14 '22 10:11

radistao


I fixed this by running git fetch --unshallow on the offending repository.

like image 30
Addison Avatar answered Nov 14 '22 08:11

Addison