error: failed to push some refs to ‘https://gitee.com/majun_real/community.git’
hint: Updates were rejected because the remote contains work that you do
To https://gitee.com/majun_real/community.git
hint: not have locally. This is usually caused by another repository pushing
hint: to the same ref. You may want to first integrate the remote changes
! refs/heads/master:refs/heads/master [rejected] (fetch first)

! [rejected] master -> master (fetch first)
error: failed to push some refs to ‘https://gitee.com/xxxx.git’
hint: Updates were rejected because the remote contains work that you do
hint: not have locally. This is usually caused by another repository pushing
hint: to the same ref. You may want to first integrate the remote changes
hint: (e.g., ‘git pull …’) before pushing again.
hint: See the ‘Note about fast-forwards’ in ‘git push --help’ for details.

原因:本地的仓库和远程仓库都被更新过,理论上push前应该先由远程pull下来,修改后然后push

造成这个错误是因为我在gitee上修改了自己的文件,在上传本地文件之前没有把gitee上的文件拉到本地,

意思是本地和远程的文件应该合并后才能上传本地的新文件

具体方法:

1、先拉下来,会自动合并的(不用操心)

git pull origin master

2、再上传

git push -u origin master

git push报错 rejected相关推荐

  1. git push 报错Push rejected、 remote unpack failed 、unpacker error、 failed to push some refs to

    git push 报错Push rejected. remote unpack failed .unpacker error. failed to push some refs to 1.error: ...

  2. git push报错:remote: error: refusing to update checked out branch: refs/heads/master

    远程仓库通过git init初始化了一个项目,没有clone到本地,本地新建了一个项目,关联本地项目和远程仓库(参见IDEA新建本地项目关联远程git仓库 )后git push报错: wulf@wul ...

  3. git push报错:fatal: unable to access ‘https://XXXX.git/‘: Peer‘s Certificate issuer is not recognized.

    推镜像的时候,git push报错:fatal: unable to access 'https://XXXX.git/': Peer's Certificate issuer is not reco ...

  4. git push 报错 Empty reply from server 或 Failed to connect to github.com port 443: Time out

    git push 报错 Empty reply from server 或 Failed to connect to github.com port 443: Time out 问题出现 报错信息 问 ...

  5. git push 报错 ---error: commit 8aa8e31: email address yin.jiaqing@.....com is not registered in your

    git push 报错: error: commit 8aa8e31: email address yin.jiaqing@haustart.com is not registered in your ...

  6. git push报错 DENIED by fallthru(or you mis-spelled reponame)

    git push报错 DENIED by fallthru(or you mis-spelled reponame) 百度半天都说是公钥私钥问题 最后发现是管理员没开push权限

  7. git push报错处理办法

    使用办法: git add . git commit -m "原因" git push 如果git push报错 执行: git push origin 本地分支名:远程分支名 例 ...

  8. 码云git push报错 DeployKey does not support push code 解决办法

    码云git push报错 DeployKey does not support push code 解决办法 首先生成公钥去码云添加公钥有具体教程 添加公钥 一顿操作之后测试一下 git push 嗯 ...

  9. git push报错 ! [remote rejected] master -> master (push declined due to email privacy restrictions)

    使用push命令 将本地仓库push到github时 报错: git push https://github.com/lexsaints/taobao_spider.git master 报错信息如下 ...

  10. git push报错 emote: error: GH007

    报错信息: Pushing to https://github.com/***.git POST git-receive-pack (1288 bytes) remote: error: GH007: ...

最新文章

  1. SpringBoot复习:2(@Configuration注解)
  2. 基因组组装----k-mer
  3. Windows 08R2 IIS网站架设
  4. Angualr中通过原生js和ViewChild的方式获取dom
  5. Java Web系统经常使用的第三方接口
  6. 如何修改myeclipse中web项目的工作路径或默认路径
  7. java学习(70):GUL图形用户界面初识
  8. python可以实现的小游戏_今天教小白用Python实现一款小游戏!最适合装逼的神技!亲测可用...
  9. alias cli3 配置_vue-cli3项目搭建配置以及性能优化
  10. vue 点击div 获取位置_vue接入腾讯位置服务之点击事件
  11. 高级php面试题(转)
  12. 使用预计算实时全局光照优化照明-优化实时光照贴图
  13. 工商管理专业知识与实务(中级)【4】
  14. RAID1与RAID0的区别
  15. 无法查找网络工作组计算机,无法查看工作组计算机怎么解决
  16. python自动化操作浏览器
  17. 微速(微锐) 与 打码工作
  18. c语言图形学三角形平移,MFC怎么对所画几何图形进行旋转、填充、放缩???(急用)【...
  19. cf103202M. United in Stormwind
  20. OpenCL ICD Loader运行测试暨解决报错:ERROR: App log and stub log differ.

热门文章

  1. Knowledge-based Systems期刊投稿经历
  2. 计算机主机故障有哪些,电脑硬件常见故障有哪些
  3. 2016年江苏省普通高等学校第十三届高等数学竞赛试题(本科一级)讲解
  4. Burst(突发)信号
  5. xp访问共享文件夹需要重启服务器,winXP共享文件夹断开、重新连接、重设置密码的方法...
  6. Ubuntu服务器用户磁盘空间quota分配
  7. 蜂巢网格生态护坡材料,我们一直在努力
  8. LittleVGL v7.5.0在STM32F103x上的移植
  9. adobe photoshop cs4 注册码
  10. Java容器Treeset的两种排序方法