首先 将远程仓库和本地同步,消除差异 $ git pull origin master --allow-unrelated-histories 重新add和commit相应文件git push origin master成功