git init 后关联github仓库是发生错误:
Posted 瓶子2333
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了git init 后关联github仓库是发生错误:相关的知识,希望对你有一定的参考价值。
: failed to push some refs to ‘[email protected]:AlanKnightly/reactC.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 init后执行
git pull -f --all
然后再git add 、git commit
虽然输入git pull origin master 等操作无效
网上一查发现最简单的解决办法:
git push -u origin master -f
以上是关于git init 后关联github仓库是发生错误:的主要内容,如果未能解决你的问题,请参考以下文章