当前位置:   article > 正文

Git提交失败之 Updates were rejected because the tip of your current branch is behind

updates were rejected because the tip of your current branch is behind hint:

错误显示

在这里插入图片描述

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.
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8

错误产生过程

笔者在github上创建一个repository, 之后和本地的路径关联后提交代码出现以上错误。具体过程如下:

  1. 在 Github的页面上:https://github.com, 创建一个repository
  2. 在本地通过Eclipse上建立一个Project, 或是一个已经存在的目录也可以。
    总之是把本地目录进行Git 版本控管。
    3.本地使用Git Cmd 切换到本地项目目录之后Git 的初始化:
git init
  • 1

4.

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/花生_TL007/article/detail/240502
推荐阅读
相关标签
  

闽ICP备14008679号