Here is my case:
But suddenly
I had the same problem. I just deleted all the files inside .git/refs/heads
,
then I tried to edit one of my files in order for git to accept commit. Then, when I pushed my files, I got this error:
10:47 Push rejected Push has been cancelled, because there were conflicts during update. Check that conflicts were resolved correctly, and invoke push again.
However, I solved it by accepting the rebase option when merging the files, giving no conflicts.