git push失败

不知道弄错了什么
上传项目到github上失败

git commit的时候提示


On branch master
nothing to commit, working tree clean


git push 时提示

To https://github.com/Vokiinnn/Scenic_evaluate.git
 ! [rejected]        master -> master (non-fast-forward)
error: failed to push some refs to 'https://github.com/Vokiinnn/Scenic_evaluate.git'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.

百度了一下,用到了这个方法
git pull origin master --allow-unrelated-histories   
输入已上命令后,会出现一个文本文档,保存后退出,再次push 成功。。
原理还未知,先记录一下,以后更新。

转载于:https://www.cnblogs.com/vokiinnn/p/10731977.html

你可能感兴趣的:(git push失败)