When I run git gc, I get this error
fatal: bad object refs/remotes/origin/deleted/deleted.002
fatal:failed to run repack
Everything else is fine, only git gc gives the problem
To fix this I went and deleted the reference by deleting the file
.git/refs/remotes/origin/deleted/deleted.002
deleted
is a system directory and won't be visible directly. so just open the file using the path or use command prompt to delete the file.
You can save a copy also if you want restore the file later