hint: Updates were rejected because the tip of your current branch is behind

问题:

1 error: failed to push some refs to 
2 hint: Updates were rejected because the tip of your current branch is behind
3 hint: its remote counterpart. Integrate the remote changes (e.g.
4 hint: ‘git pull ...‘) before pushing again.
5 hint: See the ‘Note about fast-forwards‘ in ‘git push --help‘ for details.

 

解决:不同的本地仓库上传至远程仓库导致上传出错的问题,在上传前输入以下代码先pull一次再push:

git pull origin master --allow-unrelated-histories

hint: Updates were rejected because the tip of your current branch is behind

上一篇:面试题系列---【vue中router和route区别】


下一篇:gradle 及 git 环境下利用hook及gradle脚本自动添加versioncode和versionname的方法