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
Check .git/refs/remotes/origin. They are there and the upstream no longer has them. To clean out the remotes that no longer exist run
.git/refs/remotes/origin
git remote prune origin
You could also see what it would to by adding --dry-run before actually doing it.
--dry-run