for me, removing .git/info/ref kick things going.There shouldn't be a ref file when git is not running. But in my case there were one for whatever reason and caused the problem.
Removing the file will not remove any of your local commits or branches.