当前位置:   article > 正文

git提交失败

git提交失败

说明:如果不小心在仓库上创建了一个readme文件,而本地没有这个文件,这个时候如果推送到仓库就会出现问题了。

 ! [rejected]        master -> master (non-fast-forward)
error: failed to push some refs to 'https://gitee.com/zydltech/reptile-project'
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

解决方法:
将远程仓库的代码拉取一份与本地合并。
git pull --rebase origin master。

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

闽ICP备14008679号