'git pull returns fatal: bad object refs/remotes/__init__.py

When I run git pull I see this message:

Auto empaquetado del repositorio en segundo plano para un performance óptimo.
Vea "git help gc" para limpieza manual.
warning: El último gc reportó lo siguiente. Por favor corrige la causa
y elimine .git/gc.log.
Limpieza automática no se realizará hasta que el archivo sea eliminado.

fatal: bad object refs/remotes/__init__.py
fatal: failed to run repack

Ya está actualizado.

I then run:

rm .git/refs/remotes/__init__.py 
rm .git/gc.log

And after that git pull again, and I just see:

Auto empaquetado del repositorio en segundo plano para un performance óptimo.
Vea "git help gc" para limpieza manual.
Ya está actualizado.

Which seems to be nice, but If I do again git gc:

fatal: bad object refs/remotes/origin/PLAT-88/__init__.py
fatal: failed to run repack

Any idea why this is happening and how to fix it?

git


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source