当前位置:   article > 正文

解决报错! [rejected] master -> master (non-fast-forward) error: failed to push some refs to 'git@_! [rejected] master -> master (non-fast-forward) e

! [rejected] master -> master (non-fast-forward) error: failed to push some
在执行命令 git push origin master 时,报错 ! [rejected] master -> master (non-fast-forward) error: failed to push some refs to 'git@gitee.com:***‘
  • 使用Git上传项目到 码云gitee
git add .
git status
git commit -m "提交"
git push origin master
  • 1
  • 2
  • 3
  • 4

查了许多文档,意思是远程仓库的README.md 与本地没有合并。(建仓库的时候勾选了创建 README.md)

  • 可以使用以下命令进行合并:
git pull -rebase origin master
  • 1
  • 如果还是不成功可以试着清空仓库

  • 再次执行 push 命令,成功

Enumerating objects: 36, done.
Counting objects: 100% (36/36), done.
Delta compression using up to 8 threads
Compressing objects: 100% (29/29), done.
Writing objects: 100% (36/36), 112.31 KiB | 7.49 MiB/s, done.
Total 36 (delta 5), reused 0 (delta 0)
remote: Powered by GITEE.COM [GNK-3.8]
To gitee.com:suespring/element-base.git
 * [new branch]      master -> master
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/从前慢现在也慢/article/detail/533004
推荐阅读
相关标签
  

闽ICP备14008679号