'BitBucket Git Error: did not send all necessary objects

I am using bitbucket and git to revision a project I am currently working on. Today I tried to pull down the latest working copy of the project but was met with an error that I cant seem to find any solution to.

$ git pull
Password for 'bitbucket.org':
remote: Counting objects: 65, done.
remote: Compressing objects: 100% (31/31) done.
remote: Total 34 (delta 19), reused 0 (delta 0)
Upacking objects: 100% (34/34), done.
fatal: bad object 4324324....(etc object number)
error: https://bitbucket.org/myusername/myproject.git did not send all necessary objects

I have searched for this error "did not send all necessary objects" but there doesn't seem to be any documentation regarding this issue can anyone help please?



Solution 1:[1]

git pull --prune fixed the similar error message I had on a repo.

Solution 2:[2]

I had this issue, related to a branch. Following @fnagel 's answer, I just deleted .git/refs/remotes/origin/ and it fixed the issue.

Solution 3:[3]

I had this issue when my computer crashed while fetching a new tag. Deleting the related tags in .git/refs/tags solved the issue for me.

Sources

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

Source: Stack Overflow

Solution Source
Solution 1 Ribens
Solution 2 SebK
Solution 3 fnagel