使用git命令行提交代码到github上报错(一)
2017-02-15 20:23
232 查看
报错提示如下:
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.
原因是,在你的远程仓库中有文件并没有同步到你的本地仓库,导致提交失败,所以在每次提交代码到远程仓库前先同步一下远程仓库的代码!
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使用命令行方式提交代码到github或gitlab上
- 使用GIT命令行提交代码到GitHub
- git使用、将本地代码提交到github
- 使用Git向Github提交代码
- 使用git提交代码到github
- 使用git提交github代码
- ubuntu16系统中pycharm下使用git将代码提交到github仓库
- 如何使用git命令同步代码到github或提交到多个远程仓库
- Git的基本了解与使用、向github提交代码
- 使用终端命令行将本地项目上传到Github并提交代码
- 如何使用git工具向github提交代码
- Android Studio如何使用Git提交代码到GitHub和OsChina并解决冲突
- 如何使用git工具向github提交代码
- swift详解之二十--------在xcode中使用git管理源代码,将代码提交到github
- 使用Git往github上提交代码时出现[packet_write_wait connection to xx.xx.xx.xx Broken pipe]错误的解决办法:
- 使用git提交本地代码到github
- 使用git客户端提交代码到github
- Ubuntu下使用git提交代码至GitHub
- Linux 命令行git提交代码到github基本步骤
- 使用git提交代码到github