Error

fatal: bad object refs/remotes/origin/HEAD

Solution

git remote set-head origin --auto