I don't know why it happens, but you can delete the .git folder and initialize the repo again. This is the only thing I can do for this problem.