报错提示如下:
Administrator@PC-20150110FGWU /K/cocos2d/yc (master)
$ git push -u origin master
To git@github.com:yangchao0718/cocos2d.git
! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to ‘git@github.com:yangchao0718/cocos2d.git
hint: Updates were rejected because the tip of your current branch is behin
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推送错误,即当本地分支落后于远程分支时出现的非快进错误,并给出了具体的解决步骤。
508

被折叠的 条评论
为什么被折叠?



