简体   繁体   中英

git gc fatal error bad object refs/remotes/origin/deleted/deleted.002

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM