码迷,mamicode.com
首页 > 其他好文 > 详细

git init 后关联github仓库是发生错误:

时间:2017-11-03 13:11:09      阅读:134      评论:0      收藏:0      [点我收藏+]

标签:ast   react   because   解决办法   cte   --   git add   current   use   

: failed to push some refs to ‘git@github.com: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仓库是发生错误:

标签:ast   react   because   解决办法   cte   --   git add   current   use   

原文地址:http://www.cnblogs.com/alan2kat/p/7777481.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!