I have a fork of a Git repo and my clone appears to have an issue with an old, no longer existant, branch. I keep seeing this message:
error: refs/heads/t_1140
I had this problem and none of the remedies suggested above worked. So I edited .git/packed-refs and removed the line that mentioned the non-existent branch. All was suddenly well.
Gotta love those human-readable file formats ...