问题描述:在git bash中键入 $ git push origin master 进行提交的时候出现 如下错误:

error: failed to push some refs to 'https://github.com/bluetata/

问题原因:远程库与本地库不一致造成的,在hint中也有提示把远程库同步到本地库就可以了。

解决办法:使用命令行:

git pull --rebase origin master

该命令的意思是把远程库中的更新合并到(pull=fetch+merge)本地库中,–-rebase的作用是取消掉本地库中刚刚的commit,并把他们接到更新后的版本库之中。出现如下图执行pull执行成功后,可以成功执行git push origin master操作。


https://blog.csdn.net/dietime1943/article/details/85682688

【错误】上传新的项目出错 error: failed to push some refs to 'https://github.com/...的更多相关文章

  1. 错误:error: failed to push some refs to 'https://github.com/pzq7025/KG.git'的解决办法

    一.问题在进行[git push orgin master]的时候出现如下错误 ! [rejected] master -> master (non-fast-forward) error: f ...

  2. error: failed to push some refs to 'https://github.com/username/python.git'

    解决error: failed to push some refs to 'https://github.com/bluepen/python.git' 当我们在使用git工具上传我们自己的代码时,可 ...

  3. git push ! [rejected] master -> master (non-fast-forward) error: failed to push some refs to 'https://github.com/Operater9/guest' hint: Updates were rejected because the tip of your current bra

    推送本地代码到github报错 git push报错 ! [rejected] master -> master (non-fast-forward) error: failed to push ...

  4. git 解决 error: failed to push some refs to 'https://github.com/xxxx.git'

    在github远程创建仓库后, 利用gitbash进行提交本地文件的时候出现如下错误 [root@foundation38 demo]# git push -u origin master Usern ...

  5. git 报错:error: failed to push some refs to 'https://github.com/Anderson-An/******.git'(已解决)

    提交push 报错: $ git push origin masterTo https://github.com/Anderson-An/******.git ! [rejected] master ...

  6. git上传文件夹报错: ! [rejected] master -> master (fetch first) error: failed to push some refs to 'https://github.com/taminachen/rjxm.git' hint: Updates were rejected because the remote contains work

    使用git上传本地文件夹到远程仓库,使用如下命令:git push -u origin master时报错 原因是在GitHub创建仓库时创建了readme文件,但是本地没有这个文件,造成本地目录与远 ...

  7. error: failed to push some refs to 'https://github.com/github账号/learn_git.git' hint: Updates were rejected because the remote contains work that you do hint: not have locally. This is usually caus

    在使用git 对源代码进行push到gitHub时可能会出错,信息如下   此时很多人会尝试下面的命令把当前分支代码上传到master分支上. $ git push -u origin master ...

  8. git 本地推送远程仓库报错: error: failed to push some refs to 'https://github.com/yangtuothink/mxonline.git'

    报错现象 添加远程仓库后 推送代码的时候报错 报错分析 远程代码和本地代码不匹配问题 远程初始仓库的创建有些默认 的 README什么的本地是没有的 需要先同步后再上传 报错解决 git push - ...

  9. git/github error: failed to push some refs to 'https://github.com/shenhaha/cloudletter.git'

    git 提交代码到github上报如下错误 报错分析: 解决方法: 关闭这两个设置 再次提交代码 success

随机推荐

  1. MyBatis(一) 概述与SQL定制、对象映射

    个人博客网:https://wushaopei.github.io/    (你想要这里多有) 一.MyBatis概述 1.mybatis简介 MyBatis 是支持定制化 SQL.存储过程以及高级映 ...

  2. Java实现 蓝桥杯VIP 算法提高 统计单词数

    算法提高 统计单词数 时间限制:1.0s 内存限制:512.0MB 问题描述 统计输入英文文章段落中不同单词(单词有大小写之分, 但统计时忽略大小写)各自出现的次数. 输入段落中所含单词的总数不超过1 ...

  3. Java实现 洛谷 P1159 排行榜

    输入输出样例 输入 #1 5 HIGHHOPES UP LOWFEELINGS UP UPANDDOWN DOWN IAMSTILLSTANDING DOWN FOOLINGAROUND DOWN 输 ...

  4. OV2640读ID全是FF问题

    最近刚好在Cyclone IV上通过LVDS把一个7寸的屏点亮,赶着热度,淘宝买了OV2640这个摄像头模块,初始化因为用Vrilog比C复杂得多,易调试性不如C,所以使用STM32初始化,模块有F3 ...

  5. iOS-pthread && NSThread && iOS9网络适配

    几个概念: 进程:"正在运行"应用程序(app)就是一个进程,它至少包含一个线程:            进程的作用:为应用程序开辟内存空间: 线程:CPU调度的最小单元:     ...

  6. SpringCloud+Ehcache

    1.pom文件引入 <!-- https://mvnrepository.com/artifact/org.ehcache/ehcache --><dependency>< ...

  7. STM32学习笔记——printf

    printf复习 当我们写printf("%d\n", 1);的时候,printf函数并不能通过C语言语法得知第二个参数是int类型.printf是一个变参函数(variadic ...

  8. react中使用decorator 封装context

    2020-03-27 react中使用decorator 封装context 在传统的react context中,子组件使用context十分繁琐,如果需要使用context的子组件多的话 每个组件 ...

  9. PHP 实现过滤参数字符的方法

    //参数处理函数2function RepPostVar2($val){ if($val!=addslashes($val)) { exit(); } if(substr($val,-1)==&quo ...

  10. 关于Attach *.mdf数据库联想到的备份

    要求: 将SQL2008R2的*.mdf ( 当时内部版本不详,此时无挂接在MSSQL服务器上的数据库,只有*.mdf文件 ) --->>> SQL2008R2中,附加到现有SQL2 ...