当前位置:   article > 正文

解决git提交时的冲突问题_to the same ref. you may want to first integrate t

to the same ref. you may want to first integrate the remote changes
  1. To gitee.com:yangzhuo85/testcongtu.git
  2. ! [rejected] master -> master (fetch first)
  3. error: failed to push some refs to 'gitee.com:yangzhuo85/testcongtu.git'
  4. hint: Updates were rejected because the remote contains work that you do
  5. hint: not have locally. This is usually caused by another repository pushing
  6. hint: to the same ref. You may want to first integrate the remote changes
  7. hint: (e.g., 'git pull ...') before pushing again.
  8. hint: See the 'Note about fast-forwards' in 'git push --help' for details.

 这里是报错提示 

就是你本地的代码和云端的代码不一样,所以出现了这种问题 

解决方案也很简单

git pull --rebase origin master
这句话的意思是让你去编辑器里面看一下 是否有

 这种情况诞生,如果存在就点击保留双方即可

然后再 git add . 和 git commit -m '需要填写的东西' 之后再次使用  git status 会弹出

直接输入 git rebase --continue  不出意外只会输出一行

之后 直接进行一个 git push origin master 就可以了 

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

闽ICP备14008679号