This problem may be that the content of the two places is different, that is, you have made changes to the files in the local warehouse, but have not updated them on GitHub. There are other ways, like typing in git
git fetch --all && git reset --hard origin/master && git pull
Mandatory update.
Or simply delete the local warehouse and re-clone it from the Internet.