Had the same issue, which quite crazy cause reset --hard should always work, but it seems the working tree had a lot of differences to my target branch.
I had no time to dig this down, but found this by accident:
-
Run
git gcto do some garbage collection. It will remove unnecessary files and optimize the local repository (more info aboutgit gccan be found here). -
Simply
resetand finallyreset --hardto desired branch.$ git gc $ git reset $ git reset --hard <target_branch>