JavK JavK - 1 year ago 159
Git Question

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


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
files are connected with OS X's auto-created files.
I have added them to

But they could have been committed before I did this.

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

Thank you.

Answer Source

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