I have a bare repo cloned and need to check if the repo is broken. I tried running git status
, but it says:
fatal: this operation must be run in a work tree.
I have also tried running git gc
and it returns non-zero if the repo is broken. But this takes hell of a time as repo size is big.
Any alternate approach in doing this?
Update: I have tried git fsck
, and this also takes more or less same time as git gc
. The repo size is almost ~16 gb :(