Our CI server (TeamCity) is failing due to references that can no longer be resolved. These are branches that have been deleted from GitHub. Output from fsck
:
Checking object directories: 100% (256/256), done.
Checking object directories: 100% (256/256), done.
Checking objects: 100% (3373/3373), done.
error: refs/heads/release/rc_2.24: invalid sha1 pointer 6ef80746ca1df8884c907d29
eaccacffebc4e2bc
error: refs/heads/release/rc_lp_2: invalid sha1 pointer 6b1137f17924cc2799bb3c1c
6fd08fc82b337145
If I try and run a git remote prune origin
it fails because of the above invalid references.
We're able to resolve the issue (and get our build to run) if I manually remove the above references from .git\packed-refs
but this is a temporary solution and fails as soon as the build server does a clean checkout.
Is there a permanent solution I can use to ensure these refs are removed completely. I don't understand where they're coming from since they do not exist when I pull the repository from GitHub locally.