A git error git staus, git clone, error: inflate: data stream error (incorrect header check) solution

The following error occurred in git status, the reason is not clear, but it was deleted when an official model was created. Then git status appears again:

error: inflate: data stream error (incorrect header check)
error: unable to unpack fc0ef08b8035ddc8330feada41b2957cb885fd7e 	header
fatal: unable to read fc0ef08b8035ddc8330feada41b2957cb885fd7e

The solution is to roll back git to the previously submitted location, and there will be no problem after re-pull.
Rollback command:

$ git reset --hard HEAD^ 回退到上个版本
$ git reset --hard HEAD~3 回退到前3次提交之前,以此类推,回退到n次提交之前
$ git reset --hard commit_id 退到/进到 指定commit的sha码

I am here to directly roll back to the previous three submissions, and then pull back.

$ git reset --hard HEAD~3 

Guess you like

Origin blog.csdn.net/weixin_41422638/article/details/107559598