-
Notifications
You must be signed in to change notification settings - Fork 0
GIT Status Error & Solution
Muhammad Tariq edited this page Mar 18, 2021
·
15 revisions
muhammad@muhammad:~/$ git status
error: object file .git/objects/ab/22d9d3d8148e2170702ef275eb975e5d6d276c is empty
error: object file .git/objects/ab/22d9d3d8148e2170702ef275eb975e5d6d276c is empty
error: object file .git/objects/ab/22d9d3d8148e2170702ef275eb975e5d6d276c is empty
fatal: loose object ab22d9d3d8148e2170702ef275eb975e5d6d276c (stored in .git/objects/ab/22d9d3d8148e2170702ef275eb975e5d6d276c) is corruptThis issue can be caused by unexpected shutdown of OS or Machine.
This can be solved by the following commands
- find .git/objects/ -size 0 -exec rm -f {} ;
- git fetch origin
- git symbolic-ref HEAD refs/heads/
- git status
Ref: https://stackoverflow.com/questions/4254389/git-corrupt-loose-object