Here is my case:
But suddenly
Had the same problem. Removing .git\refs\heads\ fixed the problem for me.