错误显示

D:\devworkspace\ecpphoton\jcodef>git push
To https://github.com/osxm/jcodef.git
! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to 'https://github.com/osxm/jcodef.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.
错误产生过程
笔者在github上创建一个repository, 之后和本地的路径关联后提交代码出现以上错误。具体过程如下:
- 在 Github的页面上:https://github.com, 创建一个repository</

在尝试将本地Git项目推送到GitHub时遇到'Updates were rejected because the tip of your current branch is behind'的错误。错误发生在关联远程仓库并尝试push时,由于本地分支未同步最新远程代码。解决方案包括使用带参数的git pull或先fetch再merge。
订阅专栏 解锁全文
589

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



