简体   繁体   中英

git gc - fatal: bad object refs/remotes/Icon

My git gc is giving me errors:

error: bad ref for Icon
fatal: bad object refs/remotes/Icon
error: failed to run repack

I know those Icon files are connected with OS X's auto-created files. I have added them to .gitignore .

But they could have been committed before I did this.

I am the only one who commits / has copy to the repository.

Thank you.

Solved it.

Apparently OS X just created those files in ref folder and git was looking for them.

So I have used a command to find and recursively delete all Icon files:

find . -name "Icon?" -print0 | xargs -0 rm -rf

Source: Recursively Remove Icon? in Mac OSX.sh

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