How to deal with Git “Could not read” error

前端 未结 8 1178
萌比男神i
萌比男神i 2020-11-30 03:58

I am getting this error in my git repository:

22:09:15 $ git status
# On branch master
error: Could not read 8124cc15c63be92d534e4cdfa33c38d54deee122
error:          


        
8条回答
  •  广开言路
    2020-11-30 04:21

    If none of the above steps work and you have local changes that you want to keep and have a remote repository in tact, this reset script works wonders.

    If in addition you need to keep your stash, copy the following files over manually:

    • .git/objects
    • .git/refs/stash
    • .git/logs/refs/stash

提交回复
热议问题