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

2021/6/19 0:03:00

本文主要是介绍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的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!


扫一扫关注最新编程教程